Error: 'dict_keys' object has no attribute 'sort'

297 views
Skip to first unread message

Oleg Urminsky

unread,
Jan 27, 2015, 6:33:08 PM1/27/15
to boto-...@googlegroups.com
Hi everyone,

First-time user here.  When I try to run any basic commands (in Python 3.4.2 shell) I get the same 'dict_keys' error, shown below.  I've run into this for get_account_balance, notify_workers and other commands.

Any advice would be much appreciated!

Thanks,
Oleg

c.get_account_balance()
Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
    c.get_account_balance()
  File "C:\Python34\lib\site-packages\boto\mturk\connection.py", line 74, in get_account_balance
    ('OnHoldBalance', Price)])
  File "C:\Python34\lib\site-packages\boto\mturk\connection.py", line 837, in _process_request
    response = self.make_request(None, params, verb='POST')
  File "C:\Python34\lib\site-packages\boto\connection.py", line 1115, in make_request
    return self._mexe(http_request)
  File "C:\Python34\lib\site-packages\boto\connection.py", line 927, in _mexe
    request.authorize(connection=self)
  File "C:\Python34\lib\site-packages\boto\connection.py", line 377, in authorize
    connection._auth_handler.add_auth(self, **kwargs)
  File "C:\Python34\lib\site-packages\boto\auth.py", line 827, in add_auth
    http_request.auth_path, http_request.host)
  File "C:\Python34\lib\site-packages\boto\auth.py", line 880, in _calc_signature
    keys.sort(cmp=lambda x, y: cmp(x.lower(), y.lower()))
AttributeError: 'dict_keys' object has no attribute 'sort'

Adrian Klaver

unread,
Jan 27, 2015, 11:02:22 PM1/27/15
to boto-...@googlegroups.com
On 01/27/2015 03:33 PM, Oleg Urminsky wrote:
> Hi everyone,
>
> First-time user here. When I try to run any basic commands (in Python
> 3.4.2 shell) I get the same 'dict_keys' error, shown below. I've run
> into this for get_account_balance, notify_workers and other commands.
>
> Any advice would be much appreciated!

From here:
http://boto.readthedocs.org/en/latest/

I see that Mechanical Turk is not yet compatible with Python 3.3+
--
Adrian Klaver
adrian...@aklaver.com
Reply all
Reply to author
Forward
0 new messages