opencobra / memote

memote – the genome-scale metabolic model test suite
https://memote.readthedocs.io/
Apache License 2.0
125 stars 26 forks source link

#AttributeError: 'Config' object has no attribute 'warn' while running memote report #663

Open prashantbajpai opened 5 years ago

prashantbajpai commented 5 years ago

I am trying to test my model using memote and got the following error:

#AttributeError: 'Config' object has no attribute 'warn' 

Here is the code I tried from memote getting started page:

memote report snapshot path/to/model.xml
fatal: --local can only be used inside a git repository
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\_pytest\main.py", line 205, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\_pytest\config\__init__.py", line 663, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pluggy\hooks.py", line 311, in call_historic
INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pluggy\manager.py", line 62, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pytest_benchmark\plugin.py", line 427, in pytest_configure
INTERNALERROR>     bs = config._benchmarksession = BenchmarkSession(config)
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pytest_benchmark\session.py", line 31, in __init__
INTERNALERROR>     self.logger = Logger(self.verbose, config)
INTERNALERROR>   File "c:\users\prash\anaconda3\lib\site-packages\pytest_benchmark\logger.py", line 15, in __init__
INTERNALERROR>     self.pytest_warn = config.warn
INTERNALERROR> AttributeError: 'Config' object has no attribute 'warn'
Writing snapshot report to 'index.html'.

<System Information

OS Windows OS-release 10 Python 3.6.8

Package Versions

Jinja2 2.9.6 click 6.7 click-configfile 0.2.3 click-log 0.3.2 cobra 0.13.4 cookiecutter 1.6.0 depinfo 1.4.0 equilibrator-api 0.1.26 future 0.16.0 gitpython 2.1.11 goodtables 1.0.0 importlib-resources 1.0.2 lxml 3.7.3 memote 0.9.11 numpydoc 0.6.0 pandas 0.23.4 pip 19.1.1 pylru 1.2.0 pytest 4.4.1 python-libsbml 5.16.0 requests 2.21.0 ruamel.yaml 0.15.80 setuptools 39.0.1 six 1.10.0 sqlalchemy 1.1.9 sympy 1.0 travis-encrypt 1.1.2 wheel 0.29.0>

Any help is appreciated.

Thanks, Prashant

Midnighter commented 5 years ago

Hi Prashant, I can currently not reproduce your issue on linux. At the top of your error message it says:

fatal: --local can only be used inside a git repository

We have had some problems with git on Windows so that may be the original cause. Can you say whether you ran the command inside of a git repository or outside?

prashantbajpai commented 5 years ago

I ran it on anaconda prompt outside the git repository. I will try running it again in the repository.

Midnighter commented 5 years ago

Ah, without a git repository should actually be the easy and working case. Can you please run the following command in your conda environment:

pip install -U cobra pytest

and try again.

Midnighter commented 5 years ago

Also, at any point feel free to use the web service https://memote.io :slightly_smiling_face:

prashantbajpai commented 5 years ago

Ah, without a git repository should actually be the easy and working case. Can you please run the following command in your conda environment:

pip install -U cobra pytest

and try again.

Thanks for the prompt reply. I tried upgrading pytest as you suggested and got the following error:

ERROR: memote 0.9.11 has requirement cobra<=0.14.2, but you'll have cobra 0.15.3 which is incompatible.

I am still getting the same error as before while running memote.