Couldn't refresh skeletons for remote interpreter - Docker

已回答

I keep getting this error when trying to generate the skeletons on a dockerized Django project, using docker-compose on MacOS:

Couldn't refresh skeletons for remote interpreter
com.github.dockerjava.api.exception.NotModifiedException:
caused by: com.github.dockerjava.api.exception.NotModifiedException:
Regenerate skeletons
21

I keep seeing this issue too.  When I can eventually get skeletons to generate (usually by a combination of invalidating caches and restarting, or setting the project interpreter to "None" and then setting it back to the docker-compose interpreter), they are not used by PyCharm.

That is, packages that are definitely installed within the container are showing in the editor as unresolved references.

7

I'm having the same issue, even with PyCharm 2018.1.2

2

I'm having the same issue on PyCahrm 2018.1.2 on Ubuntu 17.10. I use python:3.6-stretch image

2

I tested this a little late last week, and seem to have isolated the problem to containers running from an alpine base image, that is those built from python:3.6-alpine.  I couldn't replicate in the standard python:3.6 container.

Out of interest, for those reporting this issue, are you all encountering the issue in python:*-alpine containers?

1

@Brett Lempereur

I'm encountering this problem on python:3.6.5, without alpine.

3

I'm encountering the issue with python:3.5.4, without alpine.

 

0

Same issue here, Pycharm 2018.1.2, python:3.6-slim

0

Delete the pycharm helpers containers docker rm -f $(docker ps -a | grep pycharm_helperד | awk '{print $1};')

and then restarting pycharm using File-> Invalidate Caches & Restart solve the problem for me.

3

Yuriri's suggestion worked for me too.  Shame it has to be done though.

0

The problem with refreshing the skeletons might be caused by this issue. It has been fixed in PyCharm 2018.1.4. Please update and execute the following line in the terminal before starting the PyCharm, which might not be necessary but would help to localize the problem better:

docker rm -f `docker ps -a -q --filter "label=com.jetbrains.pycharm_helpers.version"`

If the problem persist please attach your idea.log and docker.log from PyCharm to this YouTrack issue and leave a comment in the issue with your OS details, docker version and docker-compose version output from the terminal.

1

Now I'm having issues building containers.  Pycharm stops before it finishes building the container..

2018-06-04 07:36:50,498 [1044627]   INFO - .CloudSilentLoggingHandlerImpl -  ---> Running in feb402eb7a9c

2018-06-04 07:36:50,886 [1045015]   INFO - .CloudSilentLoggingHandlerImpl - Removing intermediate container feb402eb7a9c

2018-06-04 07:36:50,886 [1045015]   INFO - .CloudSilentLoggingHandlerImpl -  ---> a459674582de

2018-06-04 07:36:50,982 [1045111]   INFO - .CloudSilentLoggingHandlerImpl - Successfully built a459674582de

2018-06-04 07:36:51,037 [1045166]   INFO - .CloudSilentLoggingHandlerImpl - Successfully tagged pycharm_helpers:PY-181.5087.37

2018-06-04 07:36:51,198 [1045327]   INFO - .CloudSilentLoggingHandlerImpl - Creating container...
2018-06-04 07:37:53,302 [1107431]  ERROR - python.debugger.PyDebugProcess - waitForConnect() must be executed before handshake()
java.lang.IllegalStateException: waitForConnect() must be executed before handshake()
        at com.jetbrains.python.debugger.pydev.ClientModeMultiProcessDebugger.handshake(ClientModeMultiProcessDebugger.java:165)
        at com.jetbrains.python.debugger.PyDebugProcess.e(PyDebugProcess.java:403)
        at com.jetbrains.python.debugger.PyDebugProcess.access$400(PyDebugProcess.java:75)
        at com.jetbrains.python.debugger.PyDebugProcess$5.run(PyDebugProcess.java:298)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
        at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
        at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:580)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
        at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:395)
        at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
2018-06-04 07:37:53,303 [1107432]  ERROR - python.debugger.PyDebugProcess - PyCharm 2018.1.4  Build #PY-181.5087.37
2018-06-04 07:37:53,304 [1107433]  ERROR - python.debugger.PyDebugProcess - JDK: 1.8.0_152-release
2018-06-04 07:37:53,304 [1107433]  ERROR - python.debugger.PyDebugProcess - VM: OpenJDK 64-Bit Server VM

Also notice the below.... What is that and  how do I fix that?

2018-06-04 07:36:41,395 [ 936892]  ERROR - e.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.NotFoundException: {"message":"pull access denied for pycharm_helpers, repository does not exist or may require 'docker login'"}

 

0

Fails on Updating Python interpreter, Hangs on pyscpg2.

 

0

Python3.6 image
Pycharm2018.1.4

I caught the similar error until skeleton generation in python3.6 standard image with django project from docker-compose. The updating was failed at _asyncio building.

I had been able to fix it by running container with failed skeleton builder (it wasn't killed). After that regeneration was successful.

0

The following worked for me (I'm using docker-compose):

  1. (See Yuriri's advice above): docker rm -f $(docker ps -a | grep pycharm_helper | awk '{print $1};')
  2. docker-compose down
  3. Pycharm->File->Invalidate Caches / Restart (choose to invalidate and restart)

 

3

In my case the problem has disappeared.  If I did something to fix it, I've forgotten what it was.

-1

Mitch, Newander,

There was the problem with hanging on generating skeletons for an arbitrary Python package. This problem and the title problem (with NotModifiedException) have been fixed after changes within the issue.

The changes were included in PyCharm 2018.3. If you still experience certain problems please file an issue in our public issue tracker.

1

Hello from the future!

This is still an issue, and the solution still works (2019.2.3).

1

Hello @Michel,

I'm sorry to hear that. May I ask you to report it to our issue tracker and attach your idea.log (Help | Show Log in...) there?

-2

I noticed that this problem goes away if you don't set the path mapping in the interpreter settings and leave it blank (File -> Settings -> Project -> Python Interpreter -> Path mappings).

I also noticed that sometimes nothing helps except restarting the computer.

0

All, I've been struggling with this problem intermittently for a long time, and I've found that running `docker system prune -a` fixes it.

Warning: This command will essentially factory-reset your Docker installation, and you'll lose all volumes and configs.

0

请先登录再写评论。