forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster
Description
Issue Type: Bug
Run Tests throws ModuleNotFoundError even though pytest via commandline works and Debug Tests works fine
============================= test session starts =============================
platform win32 -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: d:\code\tf-optimizer-stochastic-runge-kutta, configfile: pyproject.toml
collected 0 items / 1 error
=================================== ERRORS ====================================
____________________ ERROR collecting tests/test_basics.py ____________________
ImportError while importing test module 'd:\code\tf-optimizer-stochastic-runge-kutta\tests\test_basics.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
C:\Python39\lib\importlib\__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests\test_basics.py:3: in <module>
from sgd_g2 import SGD_G2
E ModuleNotFoundError: No module named 'sgd_g2'
------------------------------- Captured stderr -------------------------------
2021-06-12 09:07:52.260040: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
- generated xml file: C:\Users\felix\AppData\Local\Temp\tmp-14424m9PpSJZ4GgIn.xml -
=========================== short test summary info ===========================
ERROR tests/test_basics.py
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 3.25s ===============================
The import also works fine in the terminal:
(env) PS D:\code\tf-optimizer-stochastic-runge-kutta> python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from sgd_g2 import SGD_G2
2021-06-12 09:14:26.844470: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
>>> The relevant package is -e git+git@github.com:FelixBenning/tf-optimizer-stochastic-runge-kutta.git@4908ff6b212a2a3b911ccda5bce995b94a548b6b#egg=SGD_G2 see
pip freeze
(env) PS D:\code\tf-optimizer-stochastic-runge-kutta> pip freeze
absl-py==0.12.0
appdirs==1.4.4
astunparse==1.6.3
atomicwrites==1.4.0
attrs==21.2.0
black==21.6b0
cachetools==4.2.2
certifi==2021.5.30
chardet==4.0.0
click==8.0.1
colorama==0.4.4
flatbuffers==1.12
gast==0.4.0
google-auth==1.31.0
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.34.1
h5py==3.1.0
idna==2.10
iniconfig==1.1.1
keras-nightly==2.5.0.dev2021032900
Keras-Preprocessing==1.1.2
Markdown==3.3.4
my-optimizer==0.1
mypy-extensions==0.4.3
numpy==1.19.5
oauthlib==3.1.1
opt-einsum==3.3.0
packaging==20.9
pathspec==0.8.1
pluggy==0.13.1
protobuf==3.17.3
py==1.10.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==2.4.7
pytest==6.2.4
regex==2021.4.4
requests==2.25.1
requests-oauthlib==1.3.0
rsa==4.7.2
-e git+git@github.com:FelixBenning/tf-optimizer-stochastic-runge-kutta.git@4908ff6b212a2a3b911ccda5bce995b94a548b6b#egg=SGD_G2
six==1.15.0
tensorboard==2.5.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.5.0
tensorflow-estimator==2.5.0
termcolor==1.1.0
toml==0.10.2
typing-extensions==3.7.4.3
urllib3==1.26.5
Werkzeug==2.0.1
wrapt==1.12.1Extension version: 2021.5.926500501
VS Code version: Code 1.57.0 (b4c1bd0a9b03c749ea011b06c6d2676c8091a70c, 2021-06-09T17:18:42.354Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.91GB (8.51GB free) |
| Process Argv | --crash-reporter-id 74736abc-a148-4775-8281-3e328798370c |
| Screen Reader | no |
| VM | 0% |
Metadata
Metadata
Assignees
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster