Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

issue with unicode #12

@martinbarlow

Description

@martinbarlow

Hi
Smugpy does not seem to handle unicode well. When i use str it passes the api, but it makes the rest of the code more difficult as i am not working with unicode characters directly.
Perhaps you cant accept unicode, or i am doing this wrong...

smugmug.albums_create arg Title=Dürrnberg(<type 'unicode'>), CategoryID=115028007(<type 'int'>)
Traceback (most recent call last):
  File "/home/mbarlow/bin/smugsync.py", line 224, in <module>
    smugmug.albums_create(Title=local_album_name, CategoryID=category)
  File "/usr/local/lib/python2.7/dist-packages/smugpy/__init__.py", line 190, in api_request
    oauth = self._get_oauth_request_params(url, all_args, "POST")
  File "/usr/local/lib/python2.7/dist-packages/smugpy/__init__.py", line 246, in _get_oauth_request_params
    signature = self._oauth_signature(method, url, args)
  File "/usr/local/lib/python2.7/dist-packages/smugpy/__init__.py", line 260, in _oauth_signature
    for k, v in sorted(parameters.items())))
  File "/usr/local/lib/python2.7/dist-packages/smugpy/__init__.py", line 260, in <genexpr>
    for k, v in sorted(parameters.items())))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 1: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions