small medium large xlarge

Generic-user-small
08 Aug 2017, 14:18
Justin Calcagni (17 posts)

I started over with the gallery and so far, so good.

On P 186 after the cljs files are updated but before “displaying all available galleries”, I am receiving the following error in figwheel.

[36m—- Could not Read /c:/Sites/picture-gallery/src/cljs/picture_gallery/components/gallery.cljs line:62 column:36 —-

Invalid token: /list-thumbnails/

61 (defn fetch-gallery-thumbs! [owner] 62  (ajax/GET (str “/list-thumbnails/” owner)    ^— Invalid token: /list-thumbnails/

so for some reason in the fetch-gallery-thumbs! function the second set of double quotes is a problem.

(defn fetch-gallery-thumbs! [owner] (ajax/GET (str “/list-thumbnails/” owner) {:handler #(session/put! :thumbnail-links %)}))

I have tried copying/pasting the code and re-typing from scratch in case there were “phantom” hidden characters.I also checked the server-side code. any ideas?

Profile_pic_pragsmall
08 Aug 2017, 21:43
Dmitri Sotnikov (136 posts)

It does look like there are some phantom characters there, at least according to the error output. You might want to check the file with an editor that displays non-ascii characters.

Generic-user-small
09 Aug 2017, 02:13
Justin Calcagni (17 posts)

I tried a few other editors and no non ascii characters were found. I even switched the encoding. I removed the / characters and there was another error thrown (found EOF in the gallery-page function)

BUT when I compared to the sample code, I noticed I had a mix of spaces/tabs compared to the sample code. so i think even though the fetch-gallery-thumbs and gallery-page functions seemed like the culprit it was really some of the earlier helper functions. Once I matched their spacing to the sample code, everything worked fine

You must be logged in to comment