DamnWidget / anaconda

Anaconda turns your Sublime Text 3 in a full featured Python development IDE including autocompletion, code linting, IDE features, autopep8 formating, McCabe complexity checker Vagrant and Docker support for Sublime Text 3 using Jedi, PyFlakes, pep8, MyPy, PyLint, pep257 and McCabe that will never freeze your Sublime Text 3
http://damnwidget.github.io/anaconda/
GNU General Public License v3.0
2.22k stars 259 forks source link

Pyside autocomplete doesn't work #165

Closed tamulionis closed 10 years ago

tamulionis commented 10 years ago

When I set my interpreter to python3.4, autocompletion for pyside doesn't work. Debug shows: About push back to ST3: b'{"success": true, "completions": [["QtGui\timport", "QtGui"], ["quit\tstatement", "quit"]], "uid": "984bb5a9b3f94b7292784967e215846f"}\r\n' About push back to ST3: b'{"error": "\'utf-8\' codec can\'t decode byte 0x80 in position 24: invalid start byte", "success": false, "uid": "dff792c09e3f4d2e878531bd6a5f3156"}\r\n'

DamnWidget commented 10 years ago

Can I have the full log file please? On 20 May 2014 19:15, "tamulionis" notifications@github.com wrote:

When I set my interpreter to python3.4, autocompletion for pyside doesn't work. Debug shows: About push back to ST3: b'{"success": true, "completions": [["QtGui\timport", "QtGui"], ["quit\tstatement", "quit"]], "uid": "984bb5a9b3f94b7292784967e215846f"}\r\n' About push back to ST3: b'{"error": "\'utf-8\' codec can\'t decode byte 0x80 in position 24: invalid start byte", "success": false, "uid": "dff792c09e3f4d2e878531bd6a5f3156"}\r\n'

— Reply to this email directly or view it on GitHubhttps://github.com/DamnWidget/anaconda/issues/165 .

tamulionis commented 10 years ago

I wrote: from PySide import QtGui QtGui.

I got: DEBUG MODE About push back to ST3: b'{"completions": [["False\tkeyword", "False"], ["FileExistsError\tclass", "FileExistsError"], ["FileNotFoundError\tclass", "FileNotFoundError"], ["filter\tclass", "filter"], ["finally\tkeyword", "finally"], ["float\tclass", "float"], ["FloatingPointError\tclass", "FloatingPointError"], ["for\tkeyword", "for"], ["format\tfunction", "format"], ["from\tkeyword", "from"], ["frozenset\tclass", "frozenset"], ["FutureWarning\tclass", "FutureWarning"]], "success": true, "uid": "0a7a391328694bfea9b9f2346ddd1f3c"}\r\n' About push back to ST3: b'{"completions": [["parser\timport", "parser"], ["pathlib\timport", "pathlib"], ["pdb\timport", "pdb"], ["pep257\timport", "pep257"], ["pep8\timport", "pep8"], ["persistent_list\timport", "persistent_list"], ["pexpect\timport", "pexpect"], ["pickle\timport", "pickle"], ["pickletools\timport", "pickletools"], ["pip\timport", "pip"], ["pipes\timport", "pipes"], ["piston_mini_client\timport", "piston_mini_client"], ["pithos\timport", "pithos"], ["pkg_resources\timport", "pkg_resources"], ["pkgutil\timport", "pkgutil"], ["platform\timport", "platform"], ["plistlib\timport", "plistlib"], ["poplib\timport", "poplib"], ["posix\timport", "posix"], ["posixpath\timport", "posixpath"], ["pprint\timport", "pprint"], ["problem_report\timport", "problem_report"], ["profile\timport", "profile"], ["progress_bar\timport", "progress_bar"], ["pstats\timport", "pstats"], ["psutil\timport", "psutil"], ["pty\timport", "pty"], ["pwd\timport", "pwd"], ["pxssh\timport", "pxssh"], ["py_compile\timport", "py_compile"], ["pyclbr\timport", "pyclbr"], ["pycurl\timport", "pycurl"], ["pydoc\timport", "pydoc"], ["pydoc_data\timport", "pydoc_data"], ["pyexpat\timport", "pyexpat"], ["pyflakes\timport", "pyflakes"], ["pygtkcompat\timport", "pygtkcompat"], ["pylast\timport", "pylast"], ["PySide\timport", "PySide"], ["pysideuic\timport", "pysideuic"]], "success": true, "uid": "03ec0d29b46d446183936964204d4165"}\r\n' About push back to ST3: b'{"completions": [["import\tkeyword", "import"]], "success": true, "uid": "c911914b93074abd950fcf556fe422c6"}\r\n' About push back to ST3: b'{"completions": [["phonon\timport", "phonon"], ["QtCore\timport", "QtCore"], ["QtDeclarative\timport", "QtDeclarative"], ["QtGui\timport", "QtGui"], ["QtHelp\timport", "QtHelp"], ["QtNetwork\timport", "QtNetwork"], ["QtOpenGL\timport", "QtOpenGL"], ["QtScript\timport", "QtScript"], ["QtScriptTools\timport", "QtScriptTools"], ["QtSql\timport", "QtSql"], ["QtSvg\timport", "QtSvg"], ["QtTest\timport", "QtTest"], ["QtUiTools\timport", "QtUiTools"], ["QtWebKit\timport", "QtWebKit"], ["QtXml\timport", "QtXml"], ["QtXmlPatterns\timport", "QtXmlPatterns"], ["scripts\timport", "scripts"], ["shiboken\timport", "shiboken"], ["_setupQtDirectories\tfunction", "_setupQtDirectories"], ["_utils\timport", "_utils"], ["all\tstatement", "all"], ["version\tstatement", "version"], ["version_info\tstatement", "version_info"]], "success": true, "uid": "ce1d1354c28f4e919c88b84d390970f4"}\r\n' About push back to ST3: b'{"completions": [["QtGui\timport", "QtGui"], ["quit\tstatement", "quit"]], "success": true, "uid": "372a7142575a491b961ec6c885ff653b"}\r\n' About push back to ST3: b'{"uid": "40189f1192294d909ab1ce091086a630", "success": false, "error": "\'utf-8\' codec can\'t decode byte 0x80 in position 24: invalid start byte"}\r\n'

tamulionis commented 10 years ago

Python2 works fine and I get: About push back to ST3: {"completions": [["QtGui\timport", "QtGui"], ["quit\tstatement", "quit"]], "success": true, "uid": "08869668720847b7be876179721581b4"}

But python3: About push back to ST3: b'{"success": true, "uid": "a8d17d0a63d340659a6d54685a490bf3", "completions": [["QtGui\timport", "QtGui"], ["quit\tstatement", "quit"]]}\r\n'

Maybe it's because it doesn't decode?

DamnWidget commented 10 years ago

I have to take a look but yeah it seems so

DamnWidget commented 10 years ago

Hi

In my case in OS X 10.9.2 and Python 3.4.0 I get the same error but is because for real, PySide is not being imported at all. If I try to import and use it from the terminal I get this:

ImportError: dlopen(/Users/damnwidget/.virtualenvs/anaconda3k/lib/python3.4/site-packages/PySide/QtGui.so, 2): Library not loaded: libpyside.cpython-34m.1.2.dylib Referenced from: /Users/damnwidget/.virtualenvs/anaconda3k/lib/python3.4/site-packages/PySide/QtGui.so Reason: image not found

Can you check if it's your case?

DamnWidget commented 10 years ago

Any update on this?

tamulionis commented 10 years ago

Everything works like a charm now

nico7et8 commented 10 years ago

HOW ??? (same problem !...)

devhd commented 9 years ago

I saw a similar problem in the tox environment:

ImportError: dlopen(....../.tox/docs/lib/python3.4/site-packages/PySide/QtGui.so,
2): Library not loaded: libpyside.cpython-34m.1.2.dylib

Maybe you also need to fix PySide library path pointers in your virtual environment:

python3.4 .virtualenvs/anaconda3k/bin/pyside_postinstall.py -install