Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

ImportError: No module named pyexpat #5

Closed
arturolinares opened this issue Mar 22, 2012 · 21 comments
Closed

ImportError: No module named pyexpat #5

arturolinares opened this issue Mar 22, 2012 · 21 comments

Comments

@arturolinares
Copy link
Contributor

I'm getting this error in the console when the xdebug connection is stablished:

Traceback (most recent call last):
  File "./Xdebug.py", line 273, in gui_callback
    init = protocol.read().firstChild
  File "./Xdebug.py", line 78, in read
    document = parseString(data)
  File ".\xml\dom\minidom.py", line 1927, in parseString
  File ".\xml\dom\expatbuilder.py", line 32, in <module>
  File ".\xml\parsers\expat.py", line 4, in <module>
ImportError: No module named pyexpat

@Kindari
Copy link
Owner

Kindari commented Mar 22, 2012

Operating System?

@arturolinares
Copy link
Contributor Author

Linux.
------Mensaje original------
De: William Cahill-Manley
Para: Arturo Linares Goenaga
Asunto: Re: [SublimeXdebug] ImportError: No module named pyexpat (#5)
Enviado: 22 mar, 2012 15:33

Operating System?


Reply to this email directly or view it on GitHub:
#5 (comment)

@Kindari
Copy link
Owner

Kindari commented Mar 22, 2012

clemos/haxe-sublime-bundle#17

Looks like a similar problem is in this thread. I will keep investigating. Could you provide the following?

Distribution / version

python --version

in sublime console:
import sys
print sys.version

@mavimo
Copy link
Contributor

mavimo commented Mar 22, 2012

same error here:

import sys
print sys.version

2.6.6 (r266:84292, Jun 16 2011, 22:27:44) 
[GCC 4.4.5]

@mavimo
Copy link
Contributor

mavimo commented Mar 22, 2012

Ok, I find a solution. On ubuntu 10.10 there are some python libraries on:

/usr/lib/python2.6/lib-dynload/

so, open console and write:

import sys
sys.path.append("/usr/lib/python2.6/lib-dynload/")

now problem desappair :)

@arturolinares
Copy link
Contributor Author

Ubuntu 11.10

$ python --version
Python 2.7.2+

Sublime console:

>>> import sys
>>> print sys.version
2.6.6 (r266:84292, Jun 16 2011, 22:27:44) 
[GCC 4.4.5]

@arturolinares
Copy link
Contributor Author

Right, solved it with mavimo instructions and installing python:

$ sudo apt-get install python2.6

What should happen when selecting Status in the debugger menu?

@Kindari
Copy link
Owner

Kindari commented Mar 22, 2012

I just fixed an issue in that, so repull before trying again, but it tells you what status the debugger is in. It places the message in the status bar, it will only be there for about 5 seconds. usually in the form of "ok: starting" or "ok: stopping"

Glad your issue was resolved.

@arturolinares
Copy link
Contributor Author

Sweet! thanks a lot.

@Kindari
Copy link
Owner

Kindari commented Mar 22, 2012

If you completely restart ST2, do you have to append that path to sys.path again? If so I can see that being a pain.

@arturolinares
Copy link
Contributor Author

Yes. I just saw in the forums it enough to add a symlink to avoid that. I'll update the docs.

@bogdanbartis
Copy link

I'm having the same problem, unfortunatelly after the path append I get another error:

ImportError: /usr/lib/python2.7/lib-dynload/pyexpat.so: undefined symbol: PyCapsule_New

I've tried searching for a solution but to no avail.

Ubuntu 12.04

$ python --version
Python 2.7.3
>>> import sys
>>> print sys.version
2.6.6 (r266:84292, Jun 16 2011, 22:35:51) 
[GCC 4.4.5]

Any help would be appreciated. Thanks

@FedorKononov
Copy link

I'm having the same problem as helixdev

@jotson
Copy link
Collaborator

jotson commented Jun 7, 2012

Have you guys tried the new instructions re: python 2.6 and pyexpat in the README? In the Troubleshooting section.

@FedorKononov
Copy link

It helps. Thanks a lot!

@ElijahLynn
Copy link

The readme text fixes this, one question though, there is a python26.zip file in the directory by default. What is that for? /usr/lib/sublime-text-2/lib/python2/python26.zip

@themroc5
Copy link

i guess its being used from sublime itself...

@temple
Copy link

temple commented Nov 12, 2013

I'm still having initiall issue.

On bash

$ pwd
> /usr/lib/python2.7/lib-dynload

$ ls *expat*
> pyexpat.so

On Sublime

>>> import sys
>>> sys.path.append("/usr/lib/python2.7/lib-dynload/")

Can it only run with python 2.6?

@temple
Copy link

temple commented Nov 12, 2013

@jotson which README are you exactly referring to?

@jotson
Copy link
Collaborator

jotson commented Nov 12, 2013

This one here: https://github.com/Kindari/SublimeXdebug

@temple
Copy link

temple commented Nov 12, 2013

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants