Hello,
doing something like:
s = u“a unicode sting”
print s
results in an TypeError in recent 11.1.64. So, no unicode strings in houdini? This is especially annoying when using PyQt QString api v2…
Cheers
Sebastian
working with unicode in python
5848 5 2-
- SElsner
- Member
- 23 posts
- Joined: Nov. 2011
- Offline
-
- Erik_JE
- Member
- 300 posts
- Joined: Jan. 2010
- Offline
-
- SElsner
- Member
- 23 posts
- Joined: Nov. 2011
- Offline
-
- Erik_JE
- Member
- 300 posts
- Joined: Jan. 2010
- Offline
-
- SElsner
- Member
- 23 posts
- Joined: Nov. 2011
- Offline
Sorry, I dont get what you are saying… From what I see it is a Houdini problem (bug or known limitation in 11.1.64):
:?:
Sebastian
>> print u“hello world”
Traceback (most recent call last):
File “<console>”, line 1, in <module>
File “CPROGRA~1/SIDEEF~1/HOUDIN~1.67/houdini/python2.6libs\hou.py”, line 25114, in write
return _hou.ShellIO_write(*args)
TypeError: in method ‘ShellIO_write’, argument 2 of type ‘std::string const &’
:?:
Sebastian
-
- agudmund
- Member
- 9 posts
- Joined: Dec. 2011
- Offline
Using Fedora 12
In an interactive python shell:
>>> print ‘Porks Werfect’
Porks Werfect
>>> print u'Porks Werfect'
Porks Werfect
In Autodesk Maya Script editor:
print ‘Porks Werfect’
Porks Werfect
print u'Porks Werfect'
Porks Werfect
In sideFX Houdini python shell:
>>> print ‘Porks Werfect’
Porks Werfect
>>> print u'Porks Werfect'
Traceback (most recent call last):
File “<console>”, line 1, in <module>
File “/opt/sidefx/hfs12.1.185/houdini/python2.6libs/hou.py”, line 28613, in write
return _hou.ShellIO_write(*args)
TypeError: in method ‘ShellIO_write’, argument 2 of type ‘std::string const &’
I'm not sure, but at a quick glance and not with full access to _hou.so, this in there within in reference to the error above :
invalid null reference in method ‘ShellIO_write’, argument 2 of type ‘std::string const &’
So perhaps it's only when unicode characters are somehow returning None, that this error comes up?
Nothing major, but it does require most multi-application debug verbosity to be modified explicitly for Houdini in order to get the full printout, so any insight into what the actual bug is will be helpful.
In an interactive python shell:
>>> print ‘Porks Werfect’
Porks Werfect
>>> print u'Porks Werfect'
Porks Werfect
In Autodesk Maya Script editor:
print ‘Porks Werfect’
Porks Werfect
print u'Porks Werfect'
Porks Werfect
In sideFX Houdini python shell:
>>> print ‘Porks Werfect’
Porks Werfect
>>> print u'Porks Werfect'
Traceback (most recent call last):
File “<console>”, line 1, in <module>
File “/opt/sidefx/hfs12.1.185/houdini/python2.6libs/hou.py”, line 28613, in write
return _hou.ShellIO_write(*args)
TypeError: in method ‘ShellIO_write’, argument 2 of type ‘std::string const &’
I'm not sure, but at a quick glance and not with full access to _hou.so, this in there within in reference to the error above :
invalid null reference in method ‘ShellIO_write’, argument 2 of type ‘std::string const &’
So perhaps it's only when unicode characters are somehow returning None, that this error comes up?
Nothing major, but it does require most multi-application debug verbosity to be modified explicitly for Houdini in order to get the full printout, so any insight into what the actual bug is will be helpful.
-
- Quick Links