Created
February 23, 2012 21:26
-
-
Save mmccollow/1895144 to your computer and use it in GitHub Desktop.
unicode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[...] | |
map_label = mods_tree.xpath("*[local-name() = 'titleInfo']/*[local-name() = 'title']/text()") | |
map_label = unicode(map_label[0].strip("\t\n\r"), encoding='utf-8') | |
[...] | |
map_pid = fedora.getNextPID(name_space) | |
map_object = fedora.createObject(map_pid, label = map_label.encode('utf-8')) | |
---------- | |
Traceback (most recent call last): | |
File "./scw_ingest.py", line 153, in <module> | |
map_object = fedora.createObject(map_pid, label = map_label.encode('utf-8')) | |
File "/usr/lib/python2.6/site-packages/fcrepo-1.1_dev-py2.6.egg/fcrepo/client.py", line 50, in createObject | |
response = request.submit(body, state=state[0], label=label) | |
File "/usr/lib/python2.6/site-packages/fcrepo-1.1_dev-py2.6.egg/fcrepo/wadl.py", line 65, in submit | |
value.__class__)) | |
TypeError: Expected <type 'unicode'> for param "label" on method "createObject", got <type 'str'> instead |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment