kylebittinger / brocc

Consensus taxonomy assignment for short reads (great for fungi)
GNU General Public License v3.0
8 stars 5 forks source link

os.path.exists called with None #2

Closed kylebittinger closed 9 years ago

kylebittinger commented 9 years ago

(From Andrea Campisano)

Upon running the brocc.py command i receive this error:

brocc.py -i //FungalITSPipeline/indata/indata.fasta -b //FungalITSPipeline/BLASTdatabase/fungalITSdatabase.fasta -o //FungalITSPipeline/outdata/out -a ITS Traceback (most recent call last): File "/usr/local/bin/brocc.py", line 5, in main() File "/usr/local/lib/python2.7/dist-packages/brocclib/command.py", line 92, in main taxa_db.load_cache() File "/usr/local/lib/python2.7/dist-packages/brocclib/get_xml.py", line 27, in load_cache if os.path.exists(self.cache_fp): File "/usr/lib/python2.7/genericpath.py", line 18, in exists os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found

This error occurs when using any fasta files as input.

askerdb commented 9 years ago

I have had a similar issue with a recently cloned version of brocc (38e43151cd9b47954eeab38d8ecad8356b172903)

The problem seems to be that the cache is loaded wether --cache-fp is set or not and that fails if it isn't. The workaround is to just set it, and the solution would be to check before loading the cache

Regards, Asker Brejnrod

kylebittinger commented 9 years ago

This issue should now be fixed in the master branch.

kylebittinger commented 9 years ago

@askerdb, just tagging you here to let you know that the issue was fixed.