21 Aug 2024 11:16 PM - last edited on 23 Aug 2024 09:22 AM by MaciejNeumann
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!
Solved! Go to Solution.
11 Oct 2024 01:36 PM
I have the same issue. Is there any feedback / help related to this issue, available please?
11 Oct 2024 11:37 PM
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.
11 Oct 2024 11:52 PM
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