OneAgent-SDK-Python-AutoInstrumentation icon indicating copy to clipboard operation
OneAgent-SDK-Python-AutoInstrumentation copied to clipboard

Attempt to pass non-string type to SDK function expecting a string. Actual type: <class 'psycopg2.sql.Composed'>

Open fherpich opened this issue 3 years ago • 2 comments

Hi Team,

We are using OneAgent-SDK-Python-AutoInstrumentation as its easy and no change to code needed for Dynatrace instrumentation, but got into an issue with few apps using psycopg2, seems like this is a know issue and already fixed by the thread https://github.com/dynatrace-oss/OneAgent-SDK-Python-AutoInstrumentation/issues/22, but didn't work for us and we don't want to use Oneagent-SDK due to the amount of changes needed to the code, please let us know if anything that can be don't without change of our code or the use of the workaround suggested by Dynatrace.

ERROR 120 --- [Thread-4] processing.jobs.bg_sync_job : bgsync - An error occurred synchronizing the DDL data. argument 2: <class 'ValueError'>: Attempt to pass non-string type to SDK function expecting a string. Actual type: <class 'psycopg2.sql.Composed'>

fherpich avatar May 27 '22 00:05 fherpich

Hey folks, let me know if you need any additional information or if this was not clear.

fherpich avatar Jun 07 '22 13:06 fherpich

@fherpich Yes we can use additional information, like what line from your code is triggering this, we also accept pull requests if you have a fix

dlopes7 avatar Jun 08 '22 08:06 dlopes7

This should be fixed with 2.0.0, can you please update and test?

dlopes7 avatar Jun 22 '23 12:06 dlopes7