question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows activate script: invalid escape sequence

See original GitHub issue
  • Poetry version: 1.2.2
  • Python version: 3.9.12
  • OS version and name: Windows 11
  • pyproject.toml: n/a
  • [ x] I am on the latest stable Poetry version, installed using a recommended method.
  • [ x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [ x] I have consulted the FAQ and blog for any relevant entries or release notes.
  • [ x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Line 25 in the activate script file: <poetry env>\Scripts\activate_this.py

Fails to escape a path: for lib in "..\Lib\site-packages".split(os.pathsep):

Generating a runtime error: invalid escape sequence \L

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
neersightedcommented, Oct 27, 2022

activate_this.py is not a file provided by Poetry; nor does Poetry install any scripts into an environment that are not part of your dependency tree. I’m not sure what issue you are trying to communicate, but this is not the right repository/project.

0reactions
Secruscommented, Oct 28, 2022

Thanks, and just to confirm: virtualenv is imported by Poetry here for the activation function. Manual activation should follow this method which originates from virtualenv source here.

Poetry does not appear to be using the latest virtualenv, and the old version apparently has the bug mentioned in description above. Other users could encounter this issue in using poetry so it shouldn’t be labeled invalid.

@dataspun do you have any link to the bug report in virtualenv?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Powershell Script via Chef - Invalid escape character ...
So, I tried just copying the script over and using the execute resource to run the script but ran into access control errors....
Read more >
Invalid escape sequence \o (IDFGH-3564) #5512 - GitHub
This resolved the issue for me entirely. Worked for me as well, using Windows and VS code ESP-IDF extension. Thanks!
Read more >
Invalid escape sequence - General Usage - Julia Discourse
In Windows, the autocomplete (i.e. tab) will add a backslash before any whitespaces. e.g. If I want to include a file which is...
Read more >
Facing Unresolved compilation problem Invalid escape ...
Try using a valid escape sequence such as a backslash character. Alternatively, you should use forward slashes, those are filesystem independent ...
Read more >
Invalid escape sequence in a regular expression - IBM
Problem. A string contains a literal character that is a reserved character in the Regex class (for example, the '(' or open parentheses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found