带有lxml.html TypeError的Cx_freeze [英] Cx_freeze with lxml.html TypeError
本文介绍了带有lxml.html TypeError的Cx_freeze的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
import lxml.html
当我想使用cx_freeze进行编译时,给我错误:
Gives me error when i want to compile with cx_freeze:
Traceback (most recent call last):
File "C:\Python27\Scripts\cxfreeze", line 5, in <module>
main()
File "C:\Python27\lib\site-packages\cx_Freeze\main.py", line 188, in main
freezer.Freeze()
File "C:\Python27\lib\site-packages\cx_Freeze\freezer.py", line 572, in Freeze
self._FreezeExecutable(executable)
File "C:\Python27\lib\site-packages\cx_Freeze\freezer.py", line 186, in _FreezeExecutable
exe.copyDependentFiles, scriptModule)
File "C:\Python27\lib\site-packages\cx_Freeze\freezer.py", line 554, in _WriteModules
path = os.pathsep.join([origPath] + module.parent.path)
TypeError: can only concatenate list (not "NoneType") to list
当我删除此导入时,一切正常,但是我需要使用lxml.html而不导入它不能解决任何问题:(
When i delete this import all is OK, but i need to use lxml.html not importing it solves nothing :(
推荐答案
所收到的错误表明module.parent.path
返回NoneType
.您可能需要确保lxml
位于您的PYTHONPATH
中.
The error you are getting indicates that module.parent.path
is returning NoneType
. You probably need to make sure that lxml
is in your PYTHONPATH
.
这篇关于带有lxml.html TypeError的Cx_freeze的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文