I have just downloaded and installed Paraview’s latest nightly build and I’m getting a Unicode error whenever I want to run a file inside the Python interpreter.
>>> File "<string>", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape >>>
This error occurs whenever I attempt to run a script though Paraview’s interpreter regardless of the file size. A completely blank file will still throw this error as well. I downloaded and installed the same exact version on another machine and it works just fine.
Hi Mathieu, I am on Windows 10 and I have not changed my PYTHONPATH variable. Paraview is installed on my local drive C:\Program Files. If I save my script under C:\Users or any child to the Users directory I get the unicode error. Any other sibling directory to Users or Program Files works fine. For example if I create a folder named Git (which is a sibling of Users and Program Files) everything will work and my script will be able to run inside of Paraview’s shell. I do not have this issue with the published v5.7.0 build. I will also get the same error in pvpython.
Great I am glad I could help. Will your fix be available in the latest nightly build? I will try using pvpython again to test this.
(Edit): After checking with pvpython I didn’t have this issue. I did 100% run into this Unicode error yesterday, I can’t explain why I am not running into it now.