cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting error Method=query: KeyError('url') in python EF2 based extensiton

vinaykorlepara1
Newcomer_

Hi everyone,

I recently converted a generic database plugin from EF1 to EF2. After building and uploading the plugin to the environment, I'm encountering the following error message in the logs: "Method=query: KeyError('url')". Could anyone please help me identify the cause of this error?

Thank you!

3 REPLIES 3

jannickdeturck
Visitor

I have the same issue. Is there any feedback / help related to this issue, available please?

david_lopes
Dynatrace Mentor
Dynatrace Mentor

Are you positive you "converted" the entire extension? That includes rewriting the source code as well.

That error message means that the code is looking for a property called "url" that doesn't exist in the activation schema.

Converting database extensions means creating a SQL Datasource extension, it should not involve python at all unless you are 100% sure of what you are doing.

AntonioSousa
DynaMight Guru
DynaMight Guru

When creating a python extension in VS Code, the following code is automatically generated inside query():

        for endpoint in self.activation_config["endpoints"]:
            url = endpoint["url"]
            user = endpoint["user"]
            password = endpoint["password"]
            self.logger.debug(f"Running endpoint with url '{url}'")

 

The error you are getting is because of the second line above. You have to tweak the code. But, as @david_lopes , you shouldn't be getting that error when dealing with a SQL datasource extension.

If you are migrating from custom.db.query, use the "custom extensions creator" app

Antonio Sousa

Featured Posts