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 3.7 redirector script issue

See original GitHub issue

Issue

Version 20.0.34 with Python 3.7 on Windows seems to have messed up how tox runs. It appears to be caused by PR #1976

Environment

Provide at least:

  • OS: Microsoft Windows Server 2019 - GitHub actions

  • pip list of the host python where virtualenv is installed:

    appdirs-1.4.4 colorama-0.4.4 distlib-0.3.1 filelock-3.0.12 importlib-metadata-2.0.0 packaging-20.4 pluggy-0.13.1 py-1.9.0 pyparsing-2.4.7 six-1.15.0 toml-0.10.1 tox-3.20.1 tox-external-wheels-0.1.7 virtualenv-20.0.34 zipp-3.3.0
    

Output of the virtual environment creation

The tox output is available here: https://github.com/snowflakedb/snowflake-connector-python/runs/1250254992?check_suite_focus=true

It appears as calling the virtualenv is just like calling the system wide Python without having its dependencies injected to the system wide Python.

Here’s the important part of the output:

py37-extras-ci installed: <snip>,requests==2.23.0,<snip>
py37-extras-ci run-test-pre: PYTHONHASHSEED='436'
py37-extras-ci run-test: commands[0] | python test/extras/run.py --debug
Traceback (most recent call last):
  File "test\extras\no_use_pycon.py", line 8, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
Full path: ['D:\\a\\snowflake-connector-python\\snowflake-connector-python\\test\\extras', 'C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64\\python37.zip', 'C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64\\DLLs', 'C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64\\lib', 'C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64', 'D:\\a\\snowflake-connector-python\\snowflake-connector-python\\.tox\\py37-extras-ci', 'D:\\a\\snowflake-connector-python\\snowflake-connector-python\\.tox\\py37-extras-ci\\lib\\site-packages']
Current process information
PID: 4328
Name: python.exe
Cmdline: C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe test/extras/run.py --debug

I have checked the changelog and I think there might be an issue in the redirector script, but I haven’t actually looked at the code myself.

I have verified that pinning virtualenv==20.0.33 outside of tox solves the issue.

Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
sfc-gh-mkellercommented, Oct 15, 2020

Yup, you are right. I get the same error with venv 😓 . I’ll get on reporting this to Python and post a link here once I have done so

1reaction
gaborbernatcommented, Oct 15, 2020

In the above if you swap virtualenv calls with python -m venv can you reproduce the same issue? If yes you’ll need to report the bug to https://bugs.python.org/ for fix. If not then it’s related to virtualenv, and is our bug. Though here I suspect is venv issue. (Based on the findings we might be able to patch it here, while upstream fixes the issue, but first we must identify exactly the underlying cause).

Read more comments on GitHub >

github_iconTop Results From Across the Web

microsoft store python support · Issue #1362 · pypa/virtualenv
Install Python 3.7 from Microsoft Store get error on trying to create ... to copy the redirector from venv/scripts/nt , as @zooba suggested....
Read more >
"Permission Denied" trying to run Python on Windows 10
As far as I can tell, this was caused by a conflict with the version of Python 3.7 that was recently added into...
Read more >
Python on Windows FAQ — Python 3.11.1 documentation
How do I make Python scripts executable? Why does Python sometimes take so long to start? How do I make an executable from...
Read more >
Python 3.7 Is Now Available in the Microsoft Store for ...
The Microsoft Store version of Python 3.7 is a simplified installer for running scripts and packages. Python Store. It won't bring you the...
Read more >
vBulletin 3.7.1 - Moderation Control Panel 'redirect' Cross-Site ...
An attacker may leverage this issue to execute arbitrary script code in the browser of an unsuspecting user in the context of the...
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