Pycharm 2022.2 docker-compose issues

Answered

Since the update to 2022.2 the docker-compose interpreter is not working properly. First, the PYTHONPATH is ignored in run commands (it uses /opt/... instead). Second, the python console is not working ("Nothing to show").

I saw that people are having similar issues with Docker, is it the same issue? What would be a recommended solution?

Thanks.

10 comments
Comment actions Permalink

Okay, this solution helped me to fix the PYTHONPATH bug:

1. go to  Help | Find Action | Registry

2. disable python.use.targets.api 

3. recreate the interpreter from scratch 

However, the python console is still unavailable.

2
Comment actions Permalink

Restarting pycharm solved the python console problem too.

0
Comment actions Permalink

I had the same problem and this solution also worked for me! But I'm interested in why it changed and why this fixed it? ...Thanks for sharing!

0
Comment actions Permalink

Brilliant, this fixed it for me too -- looks like that targets api is completely broken. Tried for an entire day and there's nothing I could do to get it to work. Everything Docker-related was broken for me! 

0
Comment actions Permalink

I am using PyCharm 2022.2 as well.

The container running the interpreter had network issues both to other containers in the machine and to the internet (I could not execute `apt update` inside as an example).

Using the suggested workaround resolved the issue.

0
Comment actions Permalink

It seems like pycharm adds an http_proxy env variable to the started container. This would explain the connectivity issues.

 

 

0
Comment actions Permalink

There is an open bug report in YouTrack: PY-55394. Feel free to follow it.

1
Comment actions Permalink

Disabling python.use.targets.api worked for me. What a hassle.

0
Comment actions Permalink

@Neta

 

Disabling python.use.targets.api worked for me.

thanks.

0

Please sign in to leave a comment.