Unresolved reference etree in Pycharm

2,184 views
Skip to first unread message

Benjam901

unread,
Mar 11, 2015, 11:56:27 AM3/11/15
to python_in...@googlegroups.com
Hello all,

PyCharm has thrown me another curve ball. I cannot seem to correctly import lxml.etree and am given an unresolved reference.

from lxml import etree as ET

the annoying thing is that the application runs totally fine and I can see that etree.pyd is there but I cannot access the methods inside of etree

Has anyone ever had an issue like this with their python IDE? Pycharm or otherwise?

Cheers,

Ben

Justin Israel

unread,
Mar 11, 2015, 2:35:22 PM3/11/15
to python_in...@googlegroups.com

Like other IDEs, it comes down to the PYTHONPATH configuration for your project. I assume that while it is properly found when you launch your app, your actual IDE isnt aware of the correct location in order to introspect the package.
I'm not sure if windows needs extra PATH settings or not, but on linux/osx it would only require a properly configured PYTHONPATH


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/d969bf0d-1e82-4547-a2fc-34814d889c7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben Hearn

unread,
Mar 13, 2015, 5:24:01 AM3/13/15
to python_in...@googlegroups.com
Thanks for the tips Justin. I un-installed and reinstalled the package along with Python itself and all is well now. PyCharm is an excellent IDE but has some odd functionality sometimes.

Thanks again

- Ben

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/fm-9KjOmXyA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0FdaGfcM6UJmD7yhoSOasdYZuOg3_7tyeZngxzDZF2cg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--

Tel - +46 76245 92 90 (Sweden)

tatum...@gmail.com

unread,
Dec 5, 2017, 1:28:19 PM12/5/17
to Python Programming for Autodesk Maya
I have the problem as yours.Now I solve.``pip uninstall lxml``,and use the pycharm to install lxml, now it can be correctly import and show the function in etree.
Reply all
Reply to author
Forward
0 new messages