Skip to content

Commit

Permalink
fix weights download code to work with new zenodo
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed Oct 17, 2023
1 parent 4098bc2 commit b1d5205
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,11 @@
* change sklearn to scikit-learn in setup.py


## Release 2.9
* bugfix: make download of weights from zenodo work again
* bugfix: change sklearn package name to scikit-learn in setup.py


## Release 2.8
* bugfix: reorient streamline in plot_tractometry_results was not in voxel space
* bugfix: use correct interpolation with flirt on binary masks
Expand Down
5 changes: 0 additions & 5 deletions tractseg/libs/utils.py
Expand Up @@ -95,11 +95,6 @@ def mem_usage(print_usage=True):


def download_url(url, save_path):
import http.client
# helps to solve incomplete read erros
# https://stackoverflow.com/questions/37816596/restrict-request-to-only-ask-for-http-1-0-to-prevent-chunking-error
http.client.HTTPConnection._http_vsn = 10
http.client.HTTPConnection._http_vsn_str = 'HTTP/1.0'
try:
with open(save_path, 'wb') as f:
with requests.get(url, stream=True) as r:
Expand Down

0 comments on commit b1d5205

Please sign in to comment.