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

solid/objects.py:842: SyntaxWarning: invalid escape sequence '\O' #213

Open
andyDoucette opened this issue Feb 1, 2025 · 1 comment
Open

Comments

@andyDoucette
Copy link

Version:
solidpython @ git+https://github.com/SolidCode/SolidPython.git@d962740d600c5dfd69458c4559fc416b9beab575

Issue:

>>> import solid
/usr/local/lib/python3.12/dist-packages/solid/objects.py:842: SyntaxWarning: invalid escape sequence '\O'
  Path('My Documents\OpenSCAD\libraries'),
/usr/local/lib/python3.12/dist-packages/solid/objects.py:843: SyntaxWarning: invalid escape sequence '\P'
  Path('c:\Program Files\OpenSCAD\libraries')

Expected:
No warnings.

@andyDoucette
Copy link
Author

andyDoucette commented Feb 1, 2025

Fix:

Change the strings to raw strings in the default_paths['Windows'] dictionary of objects.py:

        'Windows': [
            Path(r'My Documents\OpenSCAD\libraries'),
            Path(r'c:\Program Files\OpenSCAD\libraries')
        ],

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