Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when exporting tags alf 3.4 UTF8 #14

Open
tamtamaouy opened this issue Oct 30, 2015 · 1 comment
Open

Error when exporting tags alf 3.4 UTF8 #14

tamtamaouy opened this issue Oct 30, 2015 · 1 comment

Comments

@tamtamaouy
Copy link

Hi,
when I try to export site TAGS from alfresco 3.4, i got this error :
Export site tag information
/usr/lib/python2.6/urllib.py:1234: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
res = map(safe_map.getitem, s)
Log out (admin)
Traceback (most recent call last):
File "export-site.py", line 257, in
main(sys.argv[1:])
File "export-site.py", line 239, in main
tagsData = sc.getSiteTagInfo(sitename, container)
File "/home/onicl/share-import-export-master/shareclient/alfresco.py", line 505, in getSiteTagInfo
result = self.doJSONGet('proxy/alfresco/slingshot/search?site=%s&term=&tag=%s&maxResults=1000&sort=&query=&repo=false' % (urllib.quote(unicode(siteId)), urllib.quote(unicode(tagName))))
File "/usr/lib/python2.6/urllib.py", line 1234, in quote
res = map(safe_map.getitem, s)
KeyError: u'\xe8'

thank in advance for any help or advise.

@tamtamaouy
Copy link
Author

Hi Wabson,

I Wang to thank you first for this great tool :)
The solution for my issue is to change this line by adding .encode ("UTF-8") like this :
result = self.doJSONGet('proxy/alfresco/slingshot/search?site=%s&term=&tag=%s&maxResults=1000&sort=&query=&repo=false' % (urllib.quote(unicode(siteId)), urllib.quote(tagName.encode("UTF-8")))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant