Debugger fails while Running .py works

(Lucas Müller) #1

Hey there,

I work on a growing project and suddenly have the problem that the debugger fails while running the python script works …
So if I want to run let’s say:

import torch

if __name__ == '__main__':
    x = torch.rand((5, 5, 5, 5))
    print(x)

that works fine, but as soon as I want to debug it I get the following error:

pydev debugger: process 77281 is connecting

Connected to pydev debugger (build 191.7479.30)
Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1758, in <module>
    main()
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1752, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1147, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/Users/lucasmueller/Repositories/deepsmlm/deepsmlm/generic/utils/dummy.py", line 1, in <module>
    import torch
  File "/Users/lucasmueller/anaconda/envs/embl/lib/python3.7/site-packages/torch/__init__.py", line 42, in <module>
    import numpy as _np
  File "/Users/lucasmueller/anaconda/envs/embl/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/Users/lucasmueller/anaconda/envs/embl/lib/python3.7/site-packages/numpy/core/__init__.py", line 40, in <module>
    from . import multiarray
  File "/Users/lucasmueller/anaconda/envs/embl/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
    from . import overrides
  File "/Users/lucasmueller/anaconda/envs/embl/lib/python3.7/site-packages/numpy/core/overrides.py", line 46, in <module>
    """)
RuntimeError: implement_array_function method already has a docstring

What kind of problem could that be?