Remote Interpreter (docker-compose) - updating skeletons hangs on PIL._imaging

Answered

Hi,

I currently have two projects with docker-compose and I try to use remote interpreter based on docker-compose service.

One project works just flawlessly, but in the other one Intellij (2018.1.2 with Python plugin) can never finish updating skeletons. Namely, it just gets stuck on PIL._imaging (that's the info in the "Background Tasks" window). `pillow` is one of the dependencies of this project, the project that works well does not contain any PIL/pillow requirement.

I gave it a change, I've been waiting for more than an hour, but no luck, still PIL._imaging. Host system is ubuntu 18.04, whereas the docker container uses ubuntu 16.04.

The idea.log just ends with nothing particular, I think:

2018-05-02 09:15:39,587 [ 26950] INFO - .skeletons.PySkeletonRefresher - Refreshing skeletons for docker-compose://[/home/rroszkowiak/(...)/docker-compose.yml]:backend/python3
2018-05-02 09:15:41,593 [ 28956] INFO - hon.packaging.PyPIPackageCache - Loaded 137419 packages from /home/rroszkowiak/.IntelliJIdea2018.1/system/python_packages/pypi-cache.json
2018-05-02 09:15:57,583 [ 44946] INFO - .skeletons.PySkeletonGenerator - Retrieving binary module list took 17958 ms
2018-05-02 09:15:57,588 [ 44951] INFO - tPregeneratedSkeletonsProvider - Home path is /home/rroszkowiak/Programy/idea-IU-181.4668.68
2018-05-02 09:16:03,903 [ 51266] INFO - .skeletons.PySkeletonGenerator - Rebuilding builtin skeletons took 6314 ms
2018-05-02 09:16:03,904 [ 51267] INFO - .skeletons.PySkeletonRefresher - Skeleton for PIL._imaging

Is it Intellij bug or there's something I can do about it?

Thanks for any help.

2
10 comments

I'm having the same issue.

0

I should also mention, I've tried deleting the .idea directory in the root of the project. I've also tried, "Invalidate Caches / Restart ..." several times. I also let it run all night and it's still stuck.

0

I'm having the same issue. This problem is only when the PIL module is installed

0

Hi, I was having the same issue (freezing on updating skeletons freezing on PIL._imaging).  Upgrading my Docker image base from Python 3.4 to Python 3.6 fixed it for me.

0

There is a known issue in the bug tracker, please follow PY-29757.

0

Yes, I'm aware, I commented there too - I'm commenting here with the workaround because this is breaking people's workflow, and at least it lets people get on with their work.

I know you guys are doing your best, but after persisting with PyCharm over the last couple of years and constantly having bugs relating to docker support and losing weeks of manhours I'll never get back finding workarounds, as soon as another IDE (i.e. VSC) supports remote interpreter and library introspection features, I fear you guys are gonna lose a lot of users.

The QA on this really needs to be bumped up the priority chain.  docker-compose + python is a very common setup these days; my personal experience has been that PyCharm support for this is always breaking.

1

Thank you for the feedback and sorry for the inconvenience. I've increased the priority of the ticket.

0

Hi Pavel, thankyou - the comment was less about this specific ticket and more around QA of new versions.  Breaking bugs like this seem to occur regularly, to the point where previously I've stopped using PyCharm for months at a time until it was fixed.

I understand some of these issues may be due to Docker/docker-machine/docker-compose changes, and you're using an upstream library for support which has its own challenges, but Docker+PyCharm is a rather common workflow these days for developers so it does need to be well tested/supported during new release QA.

 

2

What is the status for this issue? I'm trying to use docker-compose over Docker Toolbox for Windows and it takes a huge time updating the skeletons.

I'm running the following version:

PyCharm 2018.3.4 (Professional Edition)
Build #PY-183.5429.31, built on January 29, 2019
Subscription is active until January 4, 2020
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

1

@Pedro17lopes,

I haven't had any issues lately ... I would try deleting all your PyCharm_helper containers for the project and then restart PyCharm. I think what also helped was deleting any docker volumes that PyCharm creates for the project. You can have a look at the following issue for more details.

https://youtrack.jetbrains.com/issue/PY-29673

1

Please sign in to leave a comment.