Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Download of lyon dataset fails #18

Closed
elemoine opened this issue Jun 23, 2017 · 1 comment
Closed

Download of lyon dataset fails #18

elemoine opened this issue Jun 23, 2017 · 1 comment
Labels

Comments

@elemoine
Copy link
Contributor

The downloading of the lyon dataset fails for me:

$ lopocs demo --sample lyon --work-dir . --cesium         
[2017-06-23 09:41:48] Using sample data lyon: lyon.laz ... ok                                            
{'Access-Control-Allow-Origin': '*', 'Content-Encoding': 'gzip', 'Last-Modified': 'Mon, 22 May 2017 14:56:13 GMT', 'Content-Type': 'application/octet-stream', 'Connection': 'keep-alive', 'Server': 'nginx/1.6.2', 'Transfer-Encoding': 'chunked', 'Date': 'Fri, 23 Jun 2017 07:41:49 GMT'}                                
Traceback (most recent call last):                  
  File "/home/elemoine/.virtualenvs/lopocs/bin/lopocs", line 11, in <module>                             
    load_entry_point('lopocs', 'console_scripts', 'lopocs')()                                            
  File "/home/elemoine/.virtualenvs/lopocs/lib/python3.5/site-packages/click/core.py", line 722, in __call__                                                                                                       
    return self.main(*args, **kwargs)               
  File "/home/elemoine/.virtualenvs/lopocs/lib/python3.5/site-packages/click/core.py", line 697, in main 
    rv = self.invoke(ctx)                           
  File "/home/elemoine/.virtualenvs/lopocs/lib/python3.5/site-packages/click/core.py", line 1066, in invoke                                                                                                        
    return _process_result(sub_ctx.command.invoke(sub_ctx))                                              
  File "/home/elemoine/.virtualenvs/lopocs/lib/python3.5/site-packages/click/core.py", line 895, in invoke                                                                                                         
    return ctx.invoke(self.callback, **ctx.params)  
  File "/home/elemoine/.virtualenvs/lopocs/lib/python3.5/site-packages/click/core.py", line 535, in invoke                                                                                                         
    return callback(*args, **kwargs)                
  File "/home/elemoine/src/lopocs/lopocs/cli.py", line 489, in demo                                      
    download('Downloading sample', download_link, dest)                                                  
  File "/home/elemoine/src/lopocs/lopocs/cli.py", line 104, in download                                  
    length = int(r.headers['content-length'])       
  File "/home/elemoine/.virtualenvs/lopocs/lib/python3.5/site-packages/requests/structures.py", line 54, in __getitem__                                                                                            
    return self._store[key.lower()][1]              
KeyError: 'content-length'

The issue is related to the response not having a content-length header. For some reason, this header is no longer present.

@ldgeo any idea?

@elemoine elemoine added the bug label Jun 23, 2017
@ldgeo
Copy link
Contributor

ldgeo commented Jun 23, 2017

Due to the gzip module used in our download server that rewrites headers, should be ok now.

@ldgeo ldgeo closed this as completed Jun 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants