Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Windows OS, SyntaxError due to wrongly parsing the folder path string #516

Open
JayHuLBL opened this issue Jul 14, 2023 · 0 comments
Open
Assignees

Comments

@JayHuLBL
Copy link
Contributor

When run unit test, it will give following error:

Child was terminated by signal 1
Traceback (most recent call last):
  File "C:\Users\JIANJU~1\AppData\Local\Temp\tmp-Buildings-1-i6ps1sdj/./run.py", line 106, in <module>
    run_Buildings_Controls_OBC_CDL_Continuous_Validation_Acos()
  File "C:\Users\JIANJU~1\AppData\Local\Temp\tmp-Buildings-1-i6ps1sdj/./run.py", line 3, in run_Buildings_Controls_OBC_CDL_Continuous_Validation_Acos
    import Buildings_Controls_OBC_CDL_Continuous_Validation_Acos as m
  File "C:\Users\JIANJU~1\AppData\Local\Temp\tmp-Buildings-1-i6ps1sdj\Buildings_Controls_OBC_CDL_Continuous_Validation_Acos.py", line 45
    worDir = "C:\Users\JIANJU~1\AppData\Local\Temp\tmp-Buildings-1-i6ps1sdj\Buildings"
             ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

This error occurs when putting a backslash and U (\U) characters in the worDir string, which gets interpreted as the start of Unicode bytes.

See the solution in https://sebhastian.com/syntaxerror-unicode-error-unicodeescape-codec-cant-decode-bytes-in-position-2-3-truncated-escape/

@JayHuLBL JayHuLBL self-assigned this Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant