Pycharm uploading files to wrong server after updating run config




I have two remote machines and I switch the machines to run my code on from time to time. When I want to run it on the other machine, I edit my run configuration to use the other remote interpreter. Then I change stuff and click run. However, Pycharm is still uploading the file to the machine with the previously configured python remote interpreter. Pycharm does run the code on the new machine, but doesnt update the files.It runs an old version of the code that is still on that machine from previous run, so apparently it used to work.

I changed the default project environment, but Pycharm is still uploading the files to the wrong server. I also tried making a new configuration with the new machine, still files are not updated correctly. I am using 2018.3 version.

I assume this is a bug? Can I do anything about this except manually doing the file uploads?




Hi Adrian,

If problem is only with files not being uploaded from one machine to another (newer version of the files), then probably you should check Deployment configuration.

The very idea around which IDE works with remote and local files is that local files go first and remote files go second. It means that you make changes on local machine and then upload them to remote host. Do you have automatic upload enabled? (Settings/Preferences | Build, Execution, Deployment | Deployment | Options).


Yes it is enabled. Pycharm does make the automatic upload, but it does it to the wrong server!

So first I have this: Run configuration uses remote interpreter_1. I make a local change on my working machine, run the configuration. Pycharm automatically uploads the changes to server_1, and runs it. Everythings fine as expected.

Now I make another change, but now I want my code to run on server_2. So I edit my run configuration, and change the python interpreter to interpreter_2 (which is located on server_2). I click run, and Pycharm automatically uploads my local change to server_1. It then tries to run the code using interpreter_2 on server_2, and fails because the files are not there - as they were wrongly uploaded to server_1. Its like the file upload doesn't realize that I changed the python interpreter, and therefore still uploads it to the server that was previously configured.

Weird thing is that I am pretty sure it used to work, I have several run configurations using different remote interpreters and never had to manually upload any files. But now, no matter which interpreter is configured, all files are always uploaded to one specific server.


Seems like a bug with PyCharm not switching deployment configuration indeed. Here is a corresponding issue, please vote for it and follow for updates.


Please sign in to leave a comment.