# Error installing wmgx: biobakery\_workflows\_databases --install wmgx

**URL:** <https://forum.biobakery.org/t/error-installing-wmgx-biobakery-workflows-databases-install-wmgx/2431>\
**Category:** bioBakery workflows\
**Created:** [July 27, 2021, 5:27pm UTC](https://forum.biobakery.org/t/error-installing-wmgx-biobakery-workflows-databases-install-wmgx/2431 "2021-07-27T17:27:17Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![hilasha2](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/hilasha2/32/947_2.png) [@hilasha2](https://forum.biobakery.org/u/hilasha2)\
**Post date:** [August 8, 2021, 3:34pm UTC](https://forum.biobakery.org/t/error-installing-wmgx-biobakery-workflows-databases-install-wmgx/2431/5 "2021-08-08T15:34:50Z")

</div>

**Solution?**  
So I tried to trace back the issue.  
Apparently, the problem lies within a python code called _client.py_ which is part of the _http_ package.  
If installed through conda, it can be found in:  
`~/miniconda3/envs/$MY_ENV/lib/python3.7/http/client.py`

Change line 271:

```auto
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")

```

to:

```auto
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-2")

```

For some reason, the header of the http response needs to be decoded using the iso-8859-2 encoding and not iso-8859-1. I have no idea why. I know it’s not related to biobakery\_workflows, but I still thought it would be important to provide the solution as someone else might stumble upon the same problem I did.

* * *

I also had some problems with my locale which might be related.  
For documentation purposes, I got the error:

```auto
  Name: humann_count_alignments_species
  Original error: 
  Error executing action 0. Original Exception: 
  Traceback (most recent call last):
    File "~/miniconda3/envs/$MY_ENV/lib/python3.7/site-packages/anadama2/runners.py", line 201, in _run_task_locally
      action_func(task)
    File "~/miniconda3/envs/$MY_ENV/lib/python3.7/site-packages/anadama2/helpers.py", line 89, in actually_sh
      ret = _sh(s, **kwargs)
    File "~/miniconda3/envs/$MY_ENV/lib/python3.7/site-packages/anadama2/util/ __init__.py", line 320, in sh
      raise ShellException(proc.returncode, msg.format(cmd, ret[0], ret[1]))
  anadama2.util.ShellException: [Errno 1] Command `get_counts_from_humann_logs.py --input ~/output_data/humann/main --output /pita/users/hila/output_data/humann/counts/humann_read_and_species_count_table.tsv' failed. 
  Out: b''
  Err: b'Traceback (most recent call last):\n File "~/miniconda3/envs/$MY_ENV/bin/get_counts_from_humann_logs.py", line 79, in <module>\n main()\n File "~/miniconda3/envs/$MY_ENV/bin/get_counts_from_humann_logs.py", line 59, in main\n data[1]=int(line.split()[7][2:])\nValueError: invalid literal for int() with base 10: \'perl:\'\n'

```

I got this because biobakery\_workflows uses perl. The output from perl, a log file, is assigned to the variable line. Location line.split()[7][2:] doesn’t indicate what you would like it to indicate if there are problems with the locale. As in, the script tries to:

> …create a table of reads from humann log files. The table will have  
> total reads, unaligned after nucleotide search, and unaligned after translated search.  
> The table will also include the total species number.

So line.split()[7][2:] tries to get the total number of reads but if there are problems with the locale, perl might output some extra characters into the log file which are unexpected.

I eventually solved this problem, following:

> <https://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue>

It was hard solving that though, as I do not have sudo access.

I would suggest using regex instead in future updates.

---

_[View the full topic](https://forum.biobakery.org/t/error-installing-wmgx-biobakery-workflows-databases-install-wmgx/2431)._
