question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamodb describe_table not working under windows

See original GitHub issue

Hi everybody,

There is an error when I 'm trying to call

import boto3
boto3.resource(service_name='dynamodb').describe_table(TableName='MyTable')
Traceback (most recent call last):
  File "J:\test\test.py", line 6, in <module>
    test.dump_all()
  File "J:\test\test.py", line 55, in dump_all
    self.__dump_table_structure(table.name)
  File "J:\test\test.py", line 80, in __dump_table_structure
    table_description = self.__dynamodb_client.describe_table(TableName=table_name)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\client.py", line 588, in _make_api_call
    operation_model, request_dict)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\endpoint.py", line 141, in make_request
    return self._send_request(request_dict, operation_model)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\endpoint.py", line 168, in _send_request
    request, operation_model, attempts)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\endpoint.py", line 233, in _get_response
    response_dict, operation_model.output_shape)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 212, in parse
    parsed = self._do_parse(response, shape)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 598, in _do_parse
    parsed = self._parse_shape(shape, original_parsed)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 261, in _parse_shape
    return handler(shape, node)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 525, in _handle_structure
    raw_value)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 261, in _parse_shape
    return handler(shape, node)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 525, in _handle_structure
    raw_value)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 261, in _parse_shape
    return handler(shape, node)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 525, in _handle_structure
    raw_value)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 261, in _parse_shape
    return handler(shape, node)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\parsers.py", line 542, in _handle_timestamp
    return self._timestamp_parser(value)
  File "J:\PythonVirtualEnv\test\lib\site-packages\botocore\utils.py", line 350, in parse_timestamp
    return datetime.datetime.fromtimestamp(value, tzlocal())
  File "J:\PythonVirtualEnv\test\lib\site-packages\dateutil\tz\_common.py", line 110, in fromutc
    return f(self, dt)
  File "J:\PythonVirtualEnv\test\lib\site-packages\dateutil\tz\_common.py", line 224, in fromutc
    dt_wall = self._fromutc(dt)
  File "J:\PythonVirtualEnv\test\lib\site-packages\dateutil\tz\_common.py", line 188, in _fromutc
    dtoff = dt.utcoffset()
  File "J:\PythonVirtualEnv\test\lib\site-packages\dateutil\tz\tz.py", line 178, in utcoffset
    if self._isdst(dt):
  File "J:\PythonVirtualEnv\test\lib\site-packages\dateutil\tz\tz.py", line 247, in _isdst
    dstval = self._naive_is_dst(dt)
  File "J:\PythonVirtualEnv\test\lib\site-packages\dateutil\tz\tz.py", line 216, in _naive_is_dst
    return time.localtime(timestamp + time.timezone).tm_isdst
OSError: [Errno 22] Invalid argument

My requirement.txt

simplejson
boto3
  • This issue append with Windows 10 x64 with python 3.6.0
  • There is not error under linux mint 18 with python 3.6.2 x64

My timezone

from time import gmtime, strftime
print(strftime("%z", gmtime()))
# +0100
print(strftime("%Z", gmtime()))
# Paris, Madrid

So if you have any workarround for that. Thanks in advance for your help 😉

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cmachlercommented, Jan 28, 2018

As a workaround I just ended up setting my timezone in Windows to UTC, not the best solution but it works.

0reactions
swetashrecommented, Mar 30, 2020

We’ve merged #1987 as an interim solution while dateutil/dateutil#197 remains unresolved. We’ll now perform a best effort fallback to tzwinlocal if we fail to parse the timestamp on Windows. This will maintain backwards compatibility but provide a potential route to recovery for the failure users were previously experiencing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon DynamoDB: Allows access to a specific table
This policy allows actions only on DynamoDB tables that exist with the specified name. To allow your users Read access to everything in...
Read more >
"[Errno 22] Invalid argument" when running "aws dynamodb ...
I am running a trivial local DynamoDB on Windows: ... C:\WINDOWS\system32>aws dynamodb describe-table --table-name MusicCollection2 ...
Read more >
DynamoDB dynamodb:DescribeTable Error when using ...
In my object I am not using the DynamoDBTable attribute because the table name is dynamic. I'm using the DynamoDBOperationConfig and setting the ......
Read more >
Cheat Sheet for Amazon DynamoDB on AWS | Zuar
This can allow your system to adjust according to the amount of data traffic, helping you to avoid issues with performance while reducing ......
Read more >
Pod level access to DynamoDB using IAM on Amazon EKS
Amazon EKS now allows you to assign IAM permissions to Kubernetes service accounts, ... is not authorized to perform: dynamodb:DescribeTable on resource: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found