A few months ago, I set up a remote deployment server (using ssh) and used a Conda environment configured there as a Python interpreter. This caused no problems even after the update to PyCharm Professional 2020.3.1. Yesterday, I deleted my project, interpreter and existing deployment configuration and created a new one (in order to set up a new project root and add some mappings).
In order, I:
- Created an SSH configuration.
- Created a remote interpreter using that SSH configuration.
- Followed the ensuing prompt to set up the remote deployment server (where I set up the mappings I required).
However, now I'm getting the following error:
Couldn't refresh skeletons for remote interpreter
failed to run generator3/__main__.py for sftp://anonymous@10.XX.XXX.XX:XX/home/anonymous/anaconda3/envs/cooccurrence/bin/python, exit code 1, stderr:
Traceback (most recent call last):
File "/home/anonymous/.pycharm_helpers/generator3/__main__.py", line 167, in <module>
File "/home/anonymous/.pycharm_helpers/generator3/__main__.py", line 114, in main
state_json = json.loads(sys.stdin.readline()) # utf-8 by default
File "/home/anonymous/anaconda3/envs/cooccurrence/lib/python3.8/json/__init__.py", line 357, in loads
File "/home/anonymous/anaconda3/envs/cooccurrence/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/anonymous/anaconda3/envs/cooccurrence/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 8193 (char 8192)
- I've tried deleting the interpreter and deployment configuration and creating them from scratch (as suggested by Andrew Resler here)
- Deleting the ~/.pycharm_helpers directory on my remote server and then creating everything from scratch.
- Restarting PyCharm a whole lot using File>Invalidate Caches/Restart (as suggested by Yuriri here)
None of these approaches have worked.Other threads online with similar problems are specific to Docker/Vagrant, which I'm not using.
I'm not sure exactly what I broke by deleting/recreating this. The only difference I can think of is that there are now two mappings set up for my project instead of just one, but I don't see how that could cause problems.
For reference, I'm running PyCharm on a Windows machine and SSHing to a RedHat remote server for deployment (where my interpreter is also located).
The traceback suggests that the json decoder issue might be a line separator issue (i.e. \n vs \r) but I'm not sure what I could do about that.
Please let me know how to fix this, or how I can provide more info to help!