igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libcurl ssl issue

barslmn opened this issue · comments

Hi,

I had a similar error to #45.

versions:
debian: unstable
igv-reports 1.9.1

(venv) bar@debiantestin:~/runs/results.282091$ create_report $OUTPUT.bcf --genome hg38 --flanking 1000 --info-columns CSQ --tracks $OUTPUT.cram  -
-output $OUTPUT.html                                                                                                                              
[E::easy_errno] Libcurl reported error 77 (Problem with the SSL CA cert (path? access rights?))                                                   
[E::hts_open_format] Failed to open file "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/ncbiRefSeq.txt.gz" : Input/output error        
[E::easy_errno] Libcurl reported error 77 (Problem with the SSL CA cert (path? access rights?))                                             
[E::fai_load3_core] Failed to open FASTA index https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa.fai: Input/output error      
Traceback (most recent call last):                                       
  File "/home/bar/venv/bin/create_report", line 8, in <module>                                                                                    
    sys.exit(main())                                                                                                                              
             ^^^^^^                                                                                                                               
  File "/home/bar/venv/lib/python3.11/site-packages/igv_reports/report.py", line 503, in main                                                     
    create_report(args)                                                                                                                           
  File "/home/bar/venv/lib/python3.11/site-packages/igv_reports/report.py", line 109, in create_report                                            
    session_dict = json.dumps(create_session_dict(args, table, trackjson))                                                                        
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                         
  File "/home/bar/venv/lib/python3.11/site-packages/igv_reports/report.py", line 179, in create_session_dict                                          fasta_reader = FastaReader(args.fasta)                                                                                                        
                   ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                        
  File "/home/bar/venv/lib/python3.11/site-packages/igv_reports/fasta.py", line 31, in __init__                                                   
    self.fasta = pysam.FastaFile(file)                                                                                                            
                 ^^^^^^^^^^^^^^^^^^^^^                                                                                                            
  File "pysam/libcfaidx.pyx", line 121, in pysam.libcfaidx.FastaFile.__cinit__                                                                    
  File "pysam/libcfaidx.pyx", line 181, in pysam.libcfaidx.FastaFile._open                                                                        
OSError: error when opening file `https://igv-genepattern-org.s3.amazonaws.com/genomes/seq/hg38/hg38.fa` 

This solved my issue:

sudo apt install libcurl4-openssl-dev

Using the http url to reference genome solves the issue.

I still got this error but expected report was created.

[E::easy_errno] Libcurl reported error 77 (Problem with the SSL CA cert (path? access rights?))                                                   
[E::hts_open_format] Failed to open file "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/ncbiRefSeq.txt.gz" : Input/output error        

I'm not sure what's going on there but I can't detect anything wrong with the ssl certificates for any of the urls posted. They download fine via https from a web browser. I do recall some posts about SSL problems with certain versions of Libcurl.