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

Error loading locally installed extension - incompatible metadata but metadata should be correct #223

Closed
2 tasks done
luisdelatorre012 opened this issue Apr 23, 2024 · 2 comments

Comments

@luisdelatorre012
Copy link

What happens?

I'm trying to download and install the extension locally. When I load the extension, I get an incompatible metadata error message, even though I think I used the correct file. I'm running duckdb 0.10.2 on linux, python 3.11.5.

I downloaded the file from https://extensions.duckdb.org/v0.10.2/linux_amd64_gcc4/postgres_scanner.duckdb_extension.gz.

Installing gives me no error message.

When I use load_extension("postgres") I get the error message

duckdb.duckdb.InvalidInputException: 
Invalid Input Error: 
Extension "/home/<myusername>/.duckdb/extensions/v0.10.2/linux_amd64_gcc4/postgres_scanner.duckdb_extension" 
do not have metadata compatible with DuckDB loading it (version v0.10.2, platform linux_amd64_gcc4)

Am I using the wrong file, or not loading the extension correctly?

To Reproduce

download file:
wget https://extensions.duckdb.org/v0.10.2/linux_amd64_gcc4/postgres_scanner.duckdb_extension.gz

then in python:

import duckdb
con = duckdb.connect(config={"allow_unsigned_extensions": "true"})
con.install_extension("postgres_scanner.duckdb_extension.gz")
con.load_extension("postgres")

OS:

Red Hat Enterprise Linux 8.9

PostgreSQL Version:

15.6

DuckDB Version:

0.10.2

DuckDB Client:

Python

Full Name:

Luis de la Torre

Affiliation:

Expeditors

Have you tried this on the latest main branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree
@Mytherin
Copy link
Contributor

Try un-gzipping the extension before running .install_extension. Otherwise ensure that PRAGMA version and PRAGMA platform return output aligned with the extension you are downloading.

@luisdelatorre012
Copy link
Author

Thank you! It's working now, but I'm not entirely sure what fixed it because I made too many changes.

I extracted the file, installed and loaded and got the same error. Then I noticed that in ~/.duckdb/extensions I had both v0.10.1 and v0.10.2 folders with postgres_scanner. I deleted both folders, installed again, and the load now works.

@Mytherin Mytherin closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants