Skip to content

Commit

Permalink
Fix the SSL error in data fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhu2e committed Apr 3, 2024
1 parent 30bc52c commit 5bc2515
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions cfr/psm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from turtle import color
import numpy as np
import pandas as pd
from datetime import datetime
Expand Down Expand Up @@ -1143,4 +1142,4 @@ def forward(self, **vsl_kwargs):
time_unit=self.pobj.time_unit,
)

return pp
return pp
4 changes: 2 additions & 2 deletions cfr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ def replace_str(fpath, d):
f.write(text)


def download(url: str, fname: str, chunk_size=1024, show_bar=True):
resp = requests.get(url, stream=True)
def download(url: str, fname: str, chunk_size=1024, show_bar=True, verify=False):
resp = requests.get(url, stream=True, verify=verify)
total = int(resp.headers.get('content-length', 0))
if show_bar:
with open(fname, 'wb') as file, tqdm(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='cfr', # required
version='2024.1.26',
version='2024.4.3',
description='cfr: a Python package for Climate Field Reconstruction',
long_description=long_description,
long_description_content_type='text/x-rst',
Expand Down

0 comments on commit 5bc2515

Please sign in to comment.