Pregunta

(My Python is installed via Homebrew and correctly refered to by the preferences as my project interpreter)

I have a problem with PyCharms Django Shell. If I start the django shell, it runs the command (ports are changing):

/usr/local/Cellar/python/2.7.3/bin/python2.7 -u /Applications/PyCharm.app/helpers/pydev/pydevconsole.py 52135 52136

Now, this wont work, it justs states "PyDev Console: starting" and after a while, it stops.

BUT when I'm disabling my Wifi, it works! Now, what could this be?

(I'm running the latest Mountain Lion OSX, firewall disabled, PyCharm 2.5.2, Django 1.4)

¿Fue útil?

Solución

It looks like the problem is related to Mac OS DNS resolution specifics. While trying to resolve this problem with @ruffy, what fixed it was changing the LAN DNS server to Google (8.8.8.8).

I've logged this issue in PyCharm tracker so that we can provide a workaround for it in the future updates.

Related topics:

Otros consejos

I had this problem too, but this was caused because my hostname was 'localhost'. Once I changed my hostname to something else (from the sharing section in Preferences) - it worked like a (Py)Charm.

The problem was somewhere in pydev-console, and I don't know why my solution worked - I only guessed it was the problem because originally the console worked, and then it didn't and the only thing had changed was my hostname (due to some fiddling at work)

start terminal

nano /Applications/PyCharm.app/helpers/pydev/pydevconsole.py

after line 160 add:

    160 def process_exec_queue(interpreter):
  + 161     print 'here'
    162     while 1:
    163     # etcetera

save and run shell again, does it show the print message? If it does, move it into the while loop and repeat the process until you've narrowed down the problem

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top