Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module not found error in demo #278

Closed
jywarren opened this issue Jun 3, 2018 · 23 comments
Closed

Module not found error in demo #278

jywarren opened this issue Jun 3, 2018 · 23 comments

Comments

@jywarren
Copy link
Member

jywarren commented Jun 3, 2018

https://publiclab.github.io/image-sequencer/examples/#steps=import-image,blend,ndvi,colormap is returning Module not found. -- not sure why. Looking...

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

GitMate.io thinks the contributor most likely able to help you is @tech4GT.

Possibly related issues are #145 ("reader is not defined" error on demo), #3 (CORS Image error on GitHub hosted demos), #142 (Add select dropdown for some module UIs in demo), #209 (Module info in demo should source from info.json), and #215 (Refine/simplify "add module" interface in demo).

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

@jywarren the url is not correct, The current format is channel(channel:green),invert() like this

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

So then https://publiclab.github.io/image-sequencer/examples/#steps=import-image(url:0),blend(blend:function(r1%2C%20g1%2C%20b1%2C%20a1%2C%20r2%2C%20g2%2C%20b2%2C%20a2)%20%7B%20return%20%5B%20r1%2C%20g2%2C%20b2%2C%20a2%20%5D%20%7D),ndvi(filter:red),colormap(colormap:fastie)

OK - so because we're splitting on both comma and (, that's broken previous saved sequences, that's not good. I think we have to come up with a solution here...

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

@jywarren Oh I got it!! Fixing this now!! Sorry my bad!!

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

Since we're now URL-encoding the functions, we can go back to splitting on , alone, and then:

  • if there are no configurations specified OR
  • the config is the default

then we can leave out the configs?

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

No problem! I guess we should've added more thorough tests... when we write the importStepsFromString() method we can more fully test that and catch things like this 😄

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

The quickest fix right now should just be to switch to , separation, i think? We can do the other default-sensitive stuff as a follow-up.

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

@jywarren I am getting an error loading the monarch image but this is working fine!!

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

really? did you not see the error I saw?

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

I think we need to change this line:

let steps = str.split('),');

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

I can do it if it's too late at night?

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

screen shot 2018-06-03 at 11 33 24 pm

@jywarren I think this is working fine but the image is not being loaded

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

Are you sure you're in the right branch? On the link that I shared at top, it doesn't even load the steps.

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

@jywarren got the problem!!

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

I wrote a test for this -- see #279

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

and click save, it should work

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

I don't believe the monarch.png issue is blocking, although we should separately solve it -- it doesn't stop https://publiclab.github.io/image-sequencer/examples/#steps=import-image,blend,ndvi,colormap from running though!

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

@jywarren the () are essential!!

@tech4GT
Copy link
Member

tech4GT commented Jun 3, 2018

please use them after every step they are essential!!

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

Fixed in #279 ! Thanks Varun!

@jywarren
Copy link
Member Author

jywarren commented Jun 3, 2018

Part of the solution was to substitute | pipe characters for the commas when inside of the step settings, so:

#steps=invert,crop(x:1|y:0|h:10|w:10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants