# MetaPhlAn3 UnboundLocalError

**URL:** <https://forum.biobakery.org/t/metaphlan3-unboundlocalerror/1470>\
**Category:** MetaPhlAn\
**Created:** [December 22, 2020, 10:46am UTC](https://forum.biobakery.org/t/metaphlan3-unboundlocalerror/1470 "2020-12-22T10:46:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keepi983](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/keepi983/32/540_2.png) [@Keepi983](https://forum.biobakery.org/u/Keepi983)\
**Post date:** [December 22, 2020, 10:46am UTC](https://forum.biobakery.org/t/metaphlan3-unboundlocalerror/1470/1 "2020-12-22T10:46:50Z")

</div>

I’ve installed MetaPhlAn3 in my Ubuntu 64-bit machine through Anaconda3. I tried running it on a sample .fastq file. But I am getting the following error. But it is working with .sam file. But I want to work with .fastq files only. Please help me resolving this.

Downloading [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)

Warning: Unable to download [https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon\_eHvztxkamTa/file\_list.txt?dl=1](https://www.dropbox.com/sh/7qze7m7g9fe2xjg/AAA4XDP85WHon_eHvztxkamTa/file_list.txt?dl=1)  
Traceback (most recent call last):  
File “/home/priya/anaconda3/bin/metaphlan”, line 10, in   
sys.exit(main())  
File “/home/priya/anaconda3/lib/python3.8/site-packages/metaphlan/metaphlan.py”, line 916, in main  
pars[‘index’] = check\_and\_install\_database(pars[‘index’], pars[‘bowtie2db’], pars[‘bowtie2\_build’], pars[‘nproc’], pars[‘force\_download’])  
File “/home/priya/anaconda3/lib/python3.8/site-packages/metaphlan/ **init**.py”, line 271, in check\_and\_install\_database  
index = resolve\_latest\_database(bowtie2\_db, ls\_f[‘mpa\_latest’], force\_redownload\_latest)  
UnboundLocalError: local variable ‘ls\_f’ referenced before assignment

---

<div class="post-metadata">

**Author:** ![fbeghini](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/fbeghini/32/81_2.png) [@fbeghini](https://forum.biobakery.org/u/fbeghini)\
**Post date:** [December 22, 2020, 12:39pm UTC](https://forum.biobakery.org/t/metaphlan3-unboundlocalerror/1470/2 "2020-12-22T12:39:44Z")

</div>

Please check your MetaPhlAn version, I suspect you have installed an older version (maybe 3.0). The latest version is 3.0.7

---

<div class="post-metadata">

**Author:** ![Keepi983](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/keepi983/32/540_2.png) [@Keepi983](https://forum.biobakery.org/u/Keepi983)\
**Post date:** [December 24, 2020, 5:25am UTC](https://forum.biobakery.org/t/metaphlan3-unboundlocalerror/1470/3 "2020-12-24T05:25:29Z")

</div>

Yes. You are correct. I am using MetaPhlAn 3.0. But when I tried installing 3.0.7, it is running to some extant and abruptly getting stopped in the middle printing some proxy error like this. Please help me know what can be the issue.

ProxyError: Conda cannot proceed due to an error in your proxy configuration.  
Check for typos and other configuration errors in any ‘.netrc’ file in your home directory,  
any environment variables ending in ‘\_PROXY’, and any other system-wide proxy  
configuration settings.

 ![Screenshot from 2020-12-23 22-08-43](https://canada1.discourse-cdn.com/flex027/uploads/biobakery/original/1X/1d32db3edff7fed0324f9845586dd105c0cc9944.png)

---

<div class="post-metadata">

**Author:** ![fbeghini](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/fbeghini/32/81_2.png) [@fbeghini](https://forum.biobakery.org/u/fbeghini)\
**Post date:** [December 30, 2020, 10:31am UTC](https://forum.biobakery.org/t/metaphlan3-unboundlocalerror/1470/4 "2020-12-30T10:31:25Z")

</div>

I’d suggest to check your network configuration and configure conda in order to be able to fetch the packages behind a proxy.
