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

Unhandled exception while executing query: 'list' object has no attribute 'encode' #487

Open
nasc17 opened this issue Nov 28, 2023 · 1 comment
Assignees
Labels
GA GA item

Comments

@nasc17
Copy link
Collaborator

nasc17 commented Nov 28, 2023

Run:
select * from pg_catalog.pg_proc
or
select proacl from pg_catalog.pg_proc

image

Possible workaround:
Discussed in #449
"The problem is ADS knows knows how to process basic encodings like integer (number,int,bigint,etc.) or string (varchar,etc.), there maybe more but I don't know what they are (maybe date and time?).

Encodings like CIDR causes problems. I can only assume your ip_address is an encoding that is not a varcahr. I am guessing there wasn't any logic put in place for ADS to process Postgres CIDR encodings.

You can add ::TEXT at the end of each attribute you are querying with an encoding type that ADS does not recognize (i.e. CIDR). Doing this will force ADS to convert the encoding to a string before presenting. From your example I would do the following.

select asset_id
,mac_address
,ip_address::TEXT
from public.dim_asset
Can you confirm if this helped? I bet you could do the same for other encoding types that ADS does not understand.

I would recommend ADS put this in their documentation because it is not obvious.
More so, I'd like to recommend ADS do this conversion for us so we don't have to. This application presents data, so obviously we want any weird encodings to be converted to strings for presentation."

@darkshoxx
Copy link

Gonna piggyback here real quick to mention this issue that could be related, only difference is that the query is
select * from pg_database;,
will your PR fix this as well @DaeunYim ?
If not, I'm happy to raise a separate issue.

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

No branches or pull requests

3 participants