HTTP Error: Failed to download extension "httpfs" at URL "http://extensions.duckdb.org/v1.1.3/windows_amd64/httpfs.duckdb_extension.gz" (HTTP 503) #15735
Open
Description
What happens?
I am trying to use httpfs.
On macOS, the code works well. However, in Windows, it has issues.
To Reproduce
from pathlib import Path
import re
import duckdb
def main(parquet_url: str) -> None:
with duckdb.connect() as conn:
try:
conn.execute("set enable_progress_bar=true")
conn.execute(
f"""
create secret if not exists http_auth (
type http,
bearer_token 'xxx'
)
""",
)
logger.info("Loading data...")
conn.execute(f"""
create table if not exists my_table as
select * from read_parquet('{parquet_url}')
""")
# Query from cached table
query = f"""
select *
from {table_name}
"""
df = conn.execute(query).pl()
print(df)
except Exception:
print("An error occurred")
if __name__ == "__main__":
parquet_url = "https://data-browser.internal.hongbomiao.com/my.parquet"
main(parquet_url)
gives error
PS C:\query-https-data> python src/main.py
2025-01-15 09:58:09,314 - INFO - Using DuckDB cache file: data\cache.duckdb
Traceback (most recent call last):
File "C:\query-https-data\src\main.py", line 73, in <module>
main(parquet_url)
~~~~^^^^^^^^^^^^^
File "C:\query-https-data\src\main.py", line 31, in main
with duckdb.connect(duckdb_cache_db_path) as conn:
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "C:\query-https-data\src\main.py", line 32, in main
conn.load_extension("httpfs")
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
duckdb.duckdb.IOException: IO Error: Extension "C:\Users\Hongb\.duckdb\extensions\v1.1.3\windows_amd64\httpfs.duckdb_extension" not found.
Extension "httpfs" is an existing extension.
Install it first using "INSTALL httpfs".
I also tried use DuckDB CLI to install httpfs, but got same error.
PS C:\query-https-data> duckdb
v1.1.3 19864453f7
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D install httpfs;
HTTP Error: Failed to download extension "httpfs" at URL "http://extensions.duckdb.org/v1.1.3/windows_amd64/httpfs.duckdb_extension.gz" (HTTP 503)
Extension "httpfs" is an existing extension.
I feel it may be caused by the http
used in http://extensions.duckdb.org/v1.1.3/windows_amd64/httpfs.duckdb_extension.gz
which should be https
.
I can access this https URL successfully by browser/
OS:
Windows
DuckDB Version:
v1.1.3
DuckDB Client:
Python and CLI
Hardware:
No response
Full Name:
Hongbo Miao
Affiliation:
Personal
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
Not applicable - the reproduction does not require a data set
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
- Yes, I have