Pycharm does not update sceleton on python connected with wsl-2

Hello

I am trying to switch already prepared Django project to WSL remote python on Ubuntu.

I have created virtual enviroment, installed all packages there via PIPENV and pointed Pycharm to python executable file in this venv on wsl2.

All works except that skeleton update can't be launched as it describet in the traceback below.

 

Is it anything can be done to fix it?

I have tried invalidate cache/restart already.

All imports are marked with red lines but they are work fine. Seems like Pycharm can't follow path correctly...


failed to run generator3/__main__.py for wsl://UBUNTU/home/hardcase/.local/share/virtualenvs/ubuntu-test-1sQFdO7M/bin/python3.8, exit code 1, stderr: ----- Failed to process '_abc' while nothing yet: [Errno 1] Operation not permitted: '/mnt/c/Users/hardcase1/AppData/Local/JetBrains/PyCharm2020.1/python_stubs/688584981/array.py' Traceback (most recent call last): File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/__main__.py", line 167, in main() File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/__main__.py", line 140, in main generator.discover_and_process_all_modules(name_pattern=args.name_pattern, builtins_only=args.builtins_only) File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/core.py", line 442, in discover_and_process_all_modules self.process_module(mod.qname, mod.path) File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/core.py", line 516, in process_module status = self.reuse_or_generate_skeleton(mod_name, mod_path, sdk_skeleton_state) File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/core.py", line 574, in reuse_or_generate_skeleton copy_skeletons(mod_cache_dir, self.output_dir, get_module_origin(mod_path, mod_name)) File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/util_methods.py", line 780, in copy_skeletons copy(src_dir, dst_dir, merge=True, File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/util_methods.py", line 725, in copy copy(child_src, child_dst, merge=merge, File "/mnt/c/Program Files/JetBrains/PyCharm 2020.1/plugins/python/helpers/generator3/util_methods.py", line 736, in copy shutil.copy(src, dst) File "/usr/lib/python3.8/shutil.py", line 416, in copy copymode(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.8/shutil.py", line 305, in copymode chmod_func(dst, stat.S_IMODE(st.st_mode)) PermissionError: [Errno 1] Operation not permitted: '/mnt/c/Users/hardcase1/AppData/Local/JetBrains/PyCharm2020.1/python_stubs/688584981/array.py' -----

3 comments
Comment actions Permalink

Hi,

How did you open the project? Using local c:\ path or //wsl$ path? Actually I tried both ways but couldn't reproduce the issue.

Could you try recreating the interpreter, but do not add the interpreter paths manually? PyCharm should populate interpreter paths automatically - does it work?

0
Comment actions Permalink

Thank you for the answer. It has 'magically' fixed itself after couple of days.

0
Comment actions Permalink

I have the same issue but can't fix it.

Tried reinstalling both ubuntu and Pycharm professional 2020.

Tried restarting.

Recreated the interpreter several times.

It works by rolling back to Pycharm professional 2019.3.5 - not a fix, cause the new version is not working properly.

0

Please sign in to leave a comment.