| Reference | Downloads | Github

Windows to Linux

Hi, guys.

I’m having troubles when I try to run the scripts that I programmed on Windows plataform in a computer that has only Linux. Is there anyone who had some experience on that?

Hi Marcelo,

I’m afraid “having troubles” is not very specific… Could you be more precise? First guess: Perhaps path separators? Windows uses \, Linux /. You can circumvent this issue by using os.sep.

Hope this helps.

1 Like

Python is actually clever enough to interpret / as the path separator on all platforms. But as Jan says, you really need to tell us your actual problem.

Thanks for pointing the former out, Michael!


Hi, guys. I’m sorry for the slow responses. I’ve been busy these days.

Well, I’m sorry if i’m fallen short in explanations again. I’m attaching a picutre of the output that psychopy returns when I try to run the program.

I’m wondering if this problem can be related to the fact that in this computer we have a version of libreoffice instead of microsoft office. I think it likely that this is the problem because I used excel files (.xlsx) to create my variables and libreoffice, presumably, only runs .cvs files…I have no clues that this is the very problem…I’m just giving bold guesses…

Are you using Python 2 or 3? By default, Python 2 uses ascii encoding and Python 3 uses UTF-8. You either need to replace the character you’re trying to encode (it’s an accented letter, so it depends how crucial the accent is), or use explicit decoding; i.e. try UTF-8 first but fall back on latin1.

Well, I programmed in my computer. I’m using Psychopy 3 for windows. I’m trying to run theis script in a computer with Linux and Psychopy 2.

Anyways, how do I do these replacements?