c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #34260
[Bug 870692] [NEW] coercing to Unicode
Public bug reported:
I tried to create a binary file by py2exe as following:
setup py2exe
but I got this error message:
--- 2011-10-08T15:27:37 ---
Traceback (most recent call last):
File "Koo.py", line 47, in <module>
File "Koo\Common\Common.pyc", line 77, in <module>
File "Koo\Common\Ui.pyc", line 15, in loadUiType
File "PyQt4\uic\__init__.pyc", line 156, in loadUiType
File "PyQt4\uic\Compiler\compiler.pyc", line 66, in compileUi
File "PyQt4\uic\uiparser.pyc", line 796, in parse
File "xml\etree\ElementTree.pyc", line 862, in parse
File "xml\etree\ElementTree.pyc", line 579, in parse
TypeError: coercing to Unicode: need string or buffer, NoneType found
Is there anyway to fix it? Does it related to Ui.py?
---Ui.py----
import os
try:
from PyQt4 import uic
isUicAvailable = True
except:
isUicAvailabe = False
def uiToModule( filePath):
return os.path.split( filePath[:-3] )[-1]
if isUicAvailable:
def loadUiType( fileName ):
return uic.loadUiType( fileName )
else:
def loadUiType( fileName ):
module = uiToModule( fileName )
module = __import__( 'ui.%s' % module, globals(), locals(), [module] )
uiClasses = [x for x in dir(module) if x.startswith('Ui_')]
ui = eval( 'module.%s' % uiClasses[0] )
return (ui, None)
** Affects: openobject-client-kde
Importance: Undecided
Status: New
** Tags: koo
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/870692
Title:
coercing to Unicode
Status in Qt/KDE OpenObject Client:
New
Bug description:
I tried to create a binary file by py2exe as following:
setup py2exe
but I got this error message:
--- 2011-10-08T15:27:37 ---
Traceback (most recent call last):
File "Koo.py", line 47, in <module>
File "Koo\Common\Common.pyc", line 77, in <module>
File "Koo\Common\Ui.pyc", line 15, in loadUiType
File "PyQt4\uic\__init__.pyc", line 156, in loadUiType
File "PyQt4\uic\Compiler\compiler.pyc", line 66, in compileUi
File "PyQt4\uic\uiparser.pyc", line 796, in parse
File "xml\etree\ElementTree.pyc", line 862, in parse
File "xml\etree\ElementTree.pyc", line 579, in parse
TypeError: coercing to Unicode: need string or buffer, NoneType found
Is there anyway to fix it? Does it related to Ui.py?
---Ui.py----
import os
try:
from PyQt4 import uic
isUicAvailable = True
except:
isUicAvailabe = False
def uiToModule( filePath):
return os.path.split( filePath[:-3] )[-1]
if isUicAvailable:
def loadUiType( fileName ):
return uic.loadUiType( fileName )
else:
def loadUiType( fileName ):
module = uiToModule( fileName )
module = __import__( 'ui.%s' % module, globals(), locals(), [module] )
uiClasses = [x for x in dir(module) if x.startswith('Ui_')]
ui = eval( 'module.%s' % uiClasses[0] )
return (ui, None)
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-kde/+bug/870692/+subscriptions
Follow ups
References