Forum: Poser Python Scripting


Subject: [File]-[Run Python Script] issue?

jadeite123 opened this issue on Jan 16, 2021 ยท 5 posts


jadeite123 posted Sat, 16 January 2021 at 5:36 AM

When I run a script with [File]-[Run Python Script] on the Windows version of 12.0.340, I get an error.
It seems that the error occurs depending on the pathname.

D:\usr\poser\scripts\test.py

import sys
print(sys.version)

Results

File "", line 1
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated uXXXX escape
3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]


Is "\usr" in the pathname interpreted as an escape in the internal process....?
Changing the pathname to "D:\poser\scripts\test.py" works fine.