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

Client error 404 #25

Open
tirohia opened this issue Mar 13, 2021 · 0 comments
Open

Client error 404 #25

tirohia opened this issue Mar 13, 2021 · 0 comments

Comments

@tirohia
Copy link

tirohia commented Mar 13, 2021

Not sure what I'm doing wrong here. It's possibly more likely that I can't figure out the instructions as opposed to there actually being something wrong.

I'm following the instructions to both run the docker (version tag 1.4.1) and install it natively. Both successfully run, giving me a container of a process in the background. When I then attempt to query a bam using either of the the methods documented here, i.e:

htsget http://htsnexus.rnd.dnanex.us/v1/reads/BroadHiSeqX_b37/NA12878     --reference-name=2 --start=1000 --end=20000 -O NA12878_2.bam

I get "server returned empty JSON ticket. It's probably not meant to do that, don't know why it is, but at least it is connecting.

When I attempt to query the test data in the container or using the natively installed one, I change the url to localhost - using the port that I specified for the docker, I get:

htsget http://localhost:3000/data/gcp/gatk-test-data/wgs_bam     --reference-name=2 --start=1000 --end=20000 -O NA12878_2.bam
/home/bcurran/bin/miniconda3/envs/ga4gh/bin/htsget: error: 404 Client Error: Not Found:404 page not found

I am getting this using the api and the cli, which make me think there is a piece of instruction that I am missing. I have checked the docker to make sure that there is a relevant bam file in the correct location, there is. I have tried altering the url leaving the file path out, all of which returns the same error. I assuming that for this baseline test, I do not need to specify data sources in a config file?

The error, when using the API, is slightly longer, included below in case it's useful.

Traceback (most recent call last):                                                                                                                                                                                                            
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 94, in __get                                                                                                                                  
    response.raise_for_status()                                                                                                                                                                                                               
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/requests/models.py", line 851, in raise_for_status     
    raise HTTPError(http_error_msg, response=self)                                                                                                                                                                                            
requests.exceptions.HTTPError: 404 Client Error: Not Found                                                                                                                                                                                    
                                                                                                                                                                                                                                              
During handling of the above exception, another exception occurred:                                                                                                                                                                           
                                                                                                                                                                                                                                              
Traceback (most recent call last):                                                                                                                                                                                                            
  File "testhtsget.py", line 6, in <module>                                                                                                                                                                                                   
    htsget.get(url, output)                                                                                                                                                                                                                   
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 80, in get                                                                                                                                    
    manager.run()                                                                                                                                                                                                                             
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/protocol.py", line 140, in run                                                                                                                             
    self.__retry(self._handle_ticket_request)                                                                                                                                                                                                 
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/protocol.py", line 111, in __retry                                                                                                                         
    method(*args)                                                                                                                                                                                                                             
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 138, in _handle_ticket_request                                                                                                                
    first_piece = next(stream, "").decode(encoding)                                                                                                                                                                                           
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 105, in _stream                                                                                                                               
    response = self.__get(url, headers=headers, stream=True, timeout=self.timeout)                                                                                                                                                            
  File "/home/bcurran/bin/miniconda3/envs/ga4gh/lib/python3.6/site-packages/htsget/io.py", line 98, in __get                                                                                                                                  
    raise exceptions.ClientError(str(he), response.text)                                                                                                                                                                                      
htsget.exceptions.ClientError: 404 Client Error: Not Found:404 page not found                                                                                                                                                                 
                                                                               

Thanks
Ben.

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

1 participant