AttributeError: module 'colorlog' has no attribute 'logging'
Closed this issue · 2 comments
Version of MacsyFinder:
Macsyfinder 2.0rc1
using:
- Python 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
- NetworkX 2.5.1
MacsyFinder is distributed under the terms of the GNU General Public License (GPLv3).
See the COPYING file for details.
If you use this software please cite:
Abby SS, Néron B, Ménager H, Touchon M, Rocha EPC (2014)
MacSyFinder: A Program to Mine Genomes for Molecular Systems with an Application to CRISPR-Cas Systems.
PLoS ONE 9(10): e110726. doi:10.1371/journal.pone.0110726
and don't forget to cite models used:
macsydata cite <model>
OS
Linux : Ubuntu 18.04
Expected behavior
I'm not aware.
Actual behavior
macsydata available
Traceback (most recent call last):
File "/home/dbtserver/.local/bin/macsydata", line 33, in <module>
sys.exit(load_entry_point('macsyfinder==2.0rc1', 'console_scripts', 'macsydata')())
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 797, in main
macsypy.init_logger()
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/__init__.py", line 48, in init_logger
logging = colorlog.logging.logging
Steps to reproduce behavior
macsydata available
I have successfully installed macsyfinder in my workstation. But whenever I tried to install the models by using 'macsydata available' I always end up with the error mentioned above. Even I suppose to use your docker image, there also first I need to install models and then I have to specify the path of the installed models for the same. I tried all possible ways to fix this issue, but I could not fix the same.
Therefore, Kindly help me to fix this issue. If possible please keep an installed model in your docker image, so that I can use it for my analysis without any issues.
This bug is due to a refactoring in colorlog package.
so you have 2 solutions downgrade colorlog to 4.8.0
or better solution, upgrade macsyfinder to last version 2.0rc5
pip install -U macsyfinder==2.0rc5
Dear @bneron
As you suggested, I tried to update the macsyfinder on my server, but ended up with the following error:
dbtserver@dbtserver-CELSIUS-R970:/home/hdd2/dinesh/tools/macsyfinder$ macsydata --version
Macsydata 2.0rc1
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]
MacsyFinder is distributed under the terms of the GNU General Public License (GPLv3).
See the COPYING file for details.
If you use this software please cite:
Abby SS, Néron B, Ménager H, Touchon M, Rocha EPC (2014)
MacSyFinder: A Program to Mine Genomes for Molecular Systems with an Application to CRISPR-Cas Systems.
PLoS ONE 9(10): e110726. doi:10.1371/journal.pone.0110726
and don't forget to cite models used:
macsydata cite <model>
dbtserver@dbtserver-CELSIUS-R970:/home/hdd2/dinesh/tools/macsyfinder$ pip install -U macsyfinder==2.0rc5
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement macsyfinder==2.0rc5 (from versions: none)
ERROR: No matching distribution found for macsyfinder==2.0rc5
WARNING: You are using pip version 20.2.2; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
dbtserver@dbtserver-CELSIUS-R970:/home/hdd2/dinesh/tools/macsyfinder$ pip3 install -U macsyfinder==2.0rc5
Collecting macsyfinder==2.0rc5
Cache entry deserialization failed, entry ignored
Could not find a version that satisfies the requirement macsyfinder==2.0rc5 (from versions: 2.0rc1)
No matching distribution found for macsyfinder==2.0rc5
dbtserver@dbtserver-CELSIUS-R970:/home/hdd2/dinesh/tools/macsyfinder$
I followed your first suggestion, and downgraded colorlog to 4.8.0
. This time, the macsydata
function displays no errors, so I downloaded TXSS models by using macsydata download TXSS
, which worked perfectly fine. I managed to download a tar file namely TXSS-1.0rc1.tar.gz
. But, when i tried to execute the command macsydata install TXSS-1.0rc1.tar.gz
I got the following error,
dbtserver@dbtserver-CELSIUS-R970:/home/hdd2/dinesh/tools/macsyfinder$ macsydata install TXSS-1.0rc1.tar.gz
Traceback (most recent call last):
File "/home/dbtserver/.local/bin/macsydata", line 11, in <module>
sys.exit(main())
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 803, in main
parsed_args.func(parsed_args)
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 252, in do_install
inst_pack_loc = _find_installed_package(pack_name)
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 228, in _find_installed_package
registry = _find_all_installed_packages()
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/scripts/macsydata.py", line 213, in _find_all_installed_packages
for model_loc in scan_models_dir(model_dir, profile_suffix=config.profile_suffix):
File "/home/dbtserver/.local/lib/python3.6/site-packages/macsypy/registries.py", line 71, in scan_models_dir
for models_type in os.listdir(models_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/share/macsyfinder/data/models'
I tried the following command macsydata install TXSS
and end up with the same error as mentioned above.
Please help me to fix this issues.