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.

KeyError getting table description

See original GitHub issue

Describe the bug

Calling wr.catalog.get_table_description on a Glue table that doesn’t have a description results in a KeyError exception being raised.

To Reproduce

awswrangler==1.5.0
  1. Create a Glue table without a description.
  2. Call wr.catalog.get_table_description on the table.

Example

The table item exists, but does not have a description.

image

>>> wr.catalog.get_table_parameters(database="sa-m2", table="item")
{'CrawlerSchemaDeserializerVersion': '1.0', 'CrawlerSchemaSerializerVersion': '1.0', 'UPDATED_BY_CRAWLER': 'sa-m2', 'averageRecordSize': '25', 'classification': 'parquet', 'compressionType': 'none', 'objectCount': '54', 'recordCount': '12349020', 'sizeKey': '174628122', 'typeOfData': 'file'}
>>> wr.catalog.get_table_description(database="sa-m2", table="item")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/awswrangler/catalog.py", line 1670, in get_table_description
    desc: str = response["Table"]["Description"]
KeyError: 'Description'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
igorborgestcommented, Aug 7, 2020

Hi @kinghuang !

It is totally off-topic, but we are stating a “Who uses AWS Data Wrangler?” section. So feel free to add yourself if you want 😄 .

1reaction
igorborgestcommented, Jun 24, 2020

Released on version 1.6.0!

Read more comments on GitHub >

github_iconTop Results From Across the Web

KeyError getting table description · Issue #294 - GitHub
Calling wr.catalog.get_table_description on a Glue table that doesn't have a description results in a KeyError exception being raised.
Read more >
keyerror in python table - Stack Overflow
After I created table, I cannot use the "incol" function to get all the values. It always give me key error. However, when...
Read more >
Python KeyError Exceptions and How to Handle Them
Python's official documentation says that the KeyError is raised when a mapping key is accessed and isn't found in the mapping. A mapping...
Read more >
What is KeyError in Python? Dictionary and Handling Them
KeyError in Python is raised when you attempt to access a key that is not in a dictionary. The mapping logic is a...
Read more >
How to Fix: KeyError in Pandas - GeeksforGeeks
In this article, we will discuss how to fix the KeyError in pandas. Pandas KeyError occurs when we try to access some column/row...
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