psychopy.org | Reference | Downloads | Github

Unable to add path via preferences

Hey, I am still quite new to psychopy, so I’d be really happy to get some feedback on this.
I want to use an external module so I am trying to add a path via the ‘paths’ option in preferences. This has worked before on my mac, now however I am working on a windows computer and when I add a path the same way I did before on my mac (e.g. [‘C:\Users\name\desktop\folder\xlwt-1.2.0’] ) and press ok or apply I get an error:
'invalid value in ‘paths’ (‘General’ Tab)'
when I use \ I can press ok but the output says:UnicodeDecodeError:‘ascii’ codec cant decode byte 0xe4 in position 4: ordinal not in range(128)

For one I think Desktop should be capitalized, and if that doesn’t work, maybe try forward slashes (that’s a bit of a shot in the dark though). If that’s a fake path in your post, maybe give us the real one you’re using and we’ll spot a typo, cause 9 times out of ten that’s what the problem ends up being.

Thanks very much for your answer! However its not that i’m afraid. I tryed forward slashes and i tried typing in the path myself and copied the path ( from the information thing) of the folder in question so that i would avoid typos.

Hmm, looking again at your error message, do you have any “strange” (non-ascii characters) in the path? Try putting a lowercase u in front of the path string:

u"C:\path"

My path includes a space, a underscore (_) and points. The u in front of the path unfortunately doesn’t work either.
Any other ideas?

found a way around it using sys.path.append(‘user\folder\xlwt’)

Hello
I am having exact same issue - can you give more details about your solution to the issue please?

[‘C:\Users\giuli\Dropbox\Bertamini Lab\PsychopyProjects\MyModules’]

This is the path I am trying to add and I ahve tried all the possible combinations and doesn’t work on my Psychopy3 on my personal laptop (but I have never had issues on other versions and computers).

Thanks a lot