#1464 Completion error in editor but not in console

pending
1
2012-01-27
2012-01-24
Alexandre Badez
No

Hi,

Versions:
Windows 7 64bits, with eclipse / java / python / OSGeo4 in 32bits.
I use PyDev 2.3.0.2011121518
Eclipse 3.7.1

I've installed OSGeo4W (available here: http://trac.osgeo.org/osgeo4w/ ) and try to use the python shiped in (with this tuto http://geographicprimitive.wordpress.com/2010/09/04/setting-up-pyqgis-development-environment-with-pydev-on-windows/ ).

When I use the pydev console in eclipse, I've no problem with completion (even for PyQt4 modules).

But in the editor, I've got this (loggin activated output):

PyCodeCompletion: Starting getCodeCompletionProposals
PyCodeCompletion: Request:CompletionRequest[ editorFile:D:\dev\workspace_python\plugin_qgis\TestMagellium\test.py activationToken:QtGui. qualifier: isInCalltip:false alreadyHasParams:false]
PyCodeCompletion: AbstractShell.getServerShell
AbstractShell: Synchronizing on shells...
AbstractShell: Getting shell related to:Python id:1 interpreter: C:\OSGeo4W\bin\python.exe
AbstractShell: pythonShell == null
AbstractShell: pythonShell.startIt()
AbstractShell: executing Name:python:EndName:Version2.7Executable:C:\OSGeo4W\bin\python.exe|C:\OSGeo4W\apps\Python27\DLLs|C:\OSGeo4W\apps\Python27\lib|C:\OSGeo4W\apps\Python27\lib\plat-win|C:\OSGeo4W\apps\Python27\lib\lib-tk|C:\OSGeo4W\apps\Python27|C:\OSGeo4W\apps\Python27\lib\site-packages|C:\OSGeo4W\apps\Python27\lib\site-packages\win32|C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib|C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin|C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode|C:\OSGeo4W\apps\Python27\sip|C:\OSGeo4W\apps\Python27\Lib|C:\OSGeo4W\apps\qgis\python@$|Image|OpenGL|PyQt4|__builtin__|__main__|_ast|_bisect|_bytesio|_codecs|_codecs_cn|_codecs_hk|_codecs_iso2022|_codecs_jp|_codecs_kr|_codecs_tw|_collections|_csv|_fileio|_functools|_heapq|_hotshot|_io|_json|_locale|_lsprof|_md5|_multibytecodec|_random|_sha|_sha256|_sha512|_sre|_struct|_subprocess|_symtable|_warnings|_weakref|_winreg|array|audioop|binascii|cPickle|cStringIO|cmath|datetime|email|errno|exceptions|future_builtins|gc|hashlib|imageop|imp|itertools|marshal|math|mmap|msvcrt|nt|numpy|operator|os|os.path|parser|pytest|scipy|signal|socket|strop|sys|thread|time|wx|wxPython|xxsubtype|zipimport|zlib "C:\Program Files (x86)\eclipse\plugins\org.python.pydev_2.3.0.2011121518\PySrc\pycompletionserver.py" 56356 56355
AbstractShell: Error creating python process - exited before creating sockets - exitValue = (1)(Name:python:EndName:Version2.7Executable:C:\OSGeo4W\bin\python.exe|C:\OSGeo4W\apps\Python27\DLLs|C:\OSGeo4W\apps\Python27\lib|C:\OSGeo4W\apps\Python27\lib\plat-win|C:\OSGeo4W\apps\Python27\lib\lib-tk|C:\OSGeo4W\apps\Python27|C:\OSGeo4W\apps\Python27\lib\site-packages|C:\OSGeo4W\apps\Python27\lib\site-packages\win32|C:\OSGeo4W\apps\Python27\lib\site-packages\win32\lib|C:\OSGeo4W\apps\Python27\lib\site-packages\Pythonwin|C:\OSGeo4W\apps\Python27\lib\site-packages\wx-2.8-msw-unicode|C:\OSGeo4W\apps\Python27\sip|C:\OSGeo4W\apps\Python27\Lib|C:\OSGeo4W\apps\qgis\python@$|Image|OpenGL|PyQt4|__builtin__|__main__|_ast|_bisect|_bytesio|_codecs|_codecs_cn|_codecs_hk|_codecs_iso2022|_codecs_jp|_codecs_kr|_codecs_tw|_collections|_csv|_fileio|_functools|_heapq|_hotshot|_io|_json|_locale|_lsprof|_md5|_multibytecodec|_random|_sha|_sha256|_sha512|_sre|_struct|_subprocess|_symtable|_warnings|_weakref|_winreg|array|audioop|binascii|cPickle|cStringIO|cmath|datetime|email|errno|exceptions|future_builtins|gc|hashlib|imageop|imp|itertools|marshal|math|mmap|msvcrt|nt|numpy|operator|os|os.path|parser|pytest|scipy|signal|socket|strop|sys|thread|time|wx|wxPython|xxsubtype|zipimport|zlib "C:\Program Files (x86)\eclipse\plugins\org.python.pydev_2.3.0.2011121518\PySrc\pycompletionserver.py" 56356 56355) - os:Windows 7

In a terminal, if I do this:
C:\OSGeo4W\bin\python.exe "C:\Program Files (x86)\eclipse\plugins\org.python.pydev_2.3.0.2011121518\PySrc\pycompletionserver.py" 56356 56355

No problem, it work.

If you have any help, I would really appreciate.

Discussion

  • I change the priority to 1, because I've found a way to make it work.
    I've install a standard cPython (2.7) and change the Python path, to use libs shiped with OsGeo4w and it work.

    Maybe it's a compilator issue... don't really know.

    ++

     
    • priority: 5 --> 1
     
  • Fabio Zadrozny
    Fabio Zadrozny
    2012-01-27

    Did you have something in your error log when the error happened?

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2012-01-27

    • status: open --> pending