"autoreload of pydev_umd failed" exception when using %autoreload in Python Console

I have my python console set up to use IPython

I want modules to reload when I change their files so I added these these to my Python Console start up script.

%load_ext autoreload
%autoreload 2

The auto reload works but every time I change a file then run something in the console I get the following exception trace.

How can get rid of this?

Or is there another way to achieve reloading of modules when they change? 

 

[autoreload of pydev_umd failed: Traceback (most recent call last):
File "D:\opt\Miniconda3\envs\advanced-analytics\lib\site-packages\IPython\extensions\autoreload.py", line 245, in check
superreload(m, reload, self.old_objects)
File "D:\opt\Miniconda3\envs\advanced-analytics\lib\site-packages\IPython\extensions\autoreload.py", line 394, in superreload
module = reload(module)
File "D:\opt\Miniconda3\envs\advanced-analytics\lib\imp.py", line 314, in reload
return importlib.reload(module)
File "D:\opt\Miniconda3\envs\advanced-analytics\lib\importlib\__init__.py", line 168, in reload
raise ModuleNotFoundError(f"spec not found for the module {name!r}", name=name)
ModuleNotFoundError: spec not found for the module 'pydev_umd'
]

1 comment
Comment actions Permalink

Hi, 

I could not reproduce the issue in PyCharm 2020.2.3, your solution works fine and autoreload works without errors. 

Which PyCharm version are you using? Try updating if you haven't yet: https://www.jetbrains.com/pycharm/download/

0

Please sign in to leave a comment.