ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
203 stars 131 forks source link

🐛 Bug: Model eos9be7 - os.PathLike object, not NoneType #404

Closed natividadesusana closed 1 year ago

natividadesusana commented 1 year ago

Describe the bug.

I successfully installed ersilia until I encountered these errors when running the eos9be7 model. On ersilia -v fetch eos9be7 I got warnings and error:

 Using cached FCD-1.0-py3-none-any.whl (53.1 MB)
ERROR: Cannot install fcd==1.0 and fcd==1.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    fcd 1.1 depends on tensorflow
    fcd 1.0 depends on tensorflow

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Collecting protobuf==3.19.5
       raise CompileError(msg)
      distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for grpcio
  Running setup.py clean for grpcio
Failed to build grpcio
Installing collected packages: sqlalchemy, grpcio, aiosignal, flask, docker, botocore, alembic, aiohttp, s3transfer, boto3, bentoml
  Attempting uninstall: sqlalchemy
    Found existing installation: SQLAlchemy 1.4.26
    Uninstalling SQLAlchemy-1.4.26:
      Successfully uninstalled SQLAlchemy-1.4.26
  Running setup.py install for grpcio ... error
  error: subprocess-exited-with-error

  × Running setup.py install for grpcio did not run successfully.
  │ exit code: 1
  ╰─> [5292 lines of output]
      ASM Builds for BoringSSL currently not supported on: macosx-11.1-arm64
      Cython-generated files are missing...
      We could not find Cython. Setup may take 10-20 minutes.
raise CompileError(msg)
      distutils.errors.CompileError: command '/usr/bin/gcc' failed with exit code 1

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> grpcio

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
13:18:27 | DEBUG    | Activation done
13:18:27 | DEBUG    | Creating environment YAML file
13:18:29 | DEBUG    | Storing Conda environment in the local environment database
13:18:29 | DEBUG    | Done with the Conda setup
13:18:29 | DEBUG    | Using environment eos9be7
13:18:29 | DEBUG    | Running command: python pack.py
13:18:29 | DEBUG    | Run commandlines on eos9be7
13:18:29 | DEBUG    | 
        python pack.py

13:18:30 | DEBUG    | Activating base environment
13:18:30 | DEBUG    | Current working directory: /Users/natividadesusana/eos/dest/eos9be7
13:18:30 | DEBUG    | Running bash /var/folders/5t/w16f6_nx4z95p4vvwr08br2m0000gn/T/ersilia-qysjgxpu/script.sh
# conda environments:
#
base                     /opt/anaconda3
eos3b5e                  /opt/anaconda3/envs/eos3b5e
eos4e41                  /opt/anaconda3/envs/eos4e41
eos9be7               *  /opt/anaconda3/envs/eos9be7
eos9f6t                  /opt/anaconda3/envs/eos9f6t
eosbase-bentoml-0.11.0-py37     /opt/anaconda3/envs/eosbase-bentoml-0.11.0-py37
ersilia                  /opt/anaconda3/envs/ersilia
                         /opt/miniconda3

Traceback (most recent call last):
  File "pack.py", line 2, in <module>
    from src.service import load_model
  File "/Users/natividadesusana/eos/dest/eos9be7/src/service.py", line 3, in <module>
    from bentoml import BentoService, api, artifacts
ModuleNotFoundError: No module named 'bentoml'
13:18:31 | DEBUG    | Activation done
13:18:31 | DEBUG    | Previous command successfully run inside eos9be7 conda environment
13:18:31 | DEBUG    | Now trying to establish symlinks
13:18:31 | DEBUG    | BentoML location is None
🚨🚨🚨 Something went wrong with Ersilia 🚨🚨🚨

Error message:

expected str, bytes or os.PathLike object, not NoneType
If this error message is not helpful, open an issue at:
 - [https://github.com/ersilia-os/ersilia](https://github.com/ersilia-os/ersilia)
Or feel free to reach out to us at:
 - hello[at]ersilia.io

If you haven't, try to run your command in verbose mode (-v in the CLI)
 - You fill find the console log file in: /Users/natividadesusana/eos/current.log

Describe the steps to reproduce the behavior

  1. conda activate ersilia
  2. ersilia -v fetch eos9be7 Error:

Expected behavior.

Fetch the model.

Screenshots.

Captura de Tela 2022-10-21 às 13 35 31 Captura de Tela 2022-10-21 às 13 36 01 Captura de Tela 2022-10-21 às 13 37 49 Captura de Tela 2022-10-21 às 13 38 24

Operating environment

MacOS M1

Additional context

All steps of Ersilia Model Hub installed.

Zainab-ik commented 1 year ago

@natividadesusana I advise to always output into a log file for easy debugging, you can run your fetch as ersilia -v fetch eos3b5e > my.log 2>&1. The log file simply saves your output which you can upload to the issue here for easy debugging as the error might be missed.

GemmaTuron commented 1 year ago

Hi @natividadesusana indeed please paste the error log or I can't help

natividadesusana commented 1 year ago

@natividadesusanaEu aconselho sempre a saída em um arquivo de log para facilitar a depuração, você pode executar sua busca como arquivos ersilia -v fetch eos3b5e > my.log 2>&1. O arquivo de log simplesmente salva sua saída, que você pode enviar para o problema aqui para facilitar a depuração, pois o erro pode ser perdido.

I tried but it didn't work ):

GemmaTuron commented 1 year ago

ok, from the little I can see in these errors ersilia is not installed, because even bentoML can't be found. Can you write down exactly the steps that you took to install ersilia? with versions etc. Also, do you have git-lfs installed? And what pops up when you do conda env list

GemmaTuron commented 1 year ago

hello @natividadesusana if you don't answer the questions I posted above cant help you out I'm sorry. I need to see the log of the error which can be collected through the command line at fetch time, or alternatively a detailed explanation of what steps did you take to install ersilia, and which conda environments do you have-

natividadesusana commented 1 year ago

When I do conda env list:

Captura de Tela 2022-10-21 às 13 50 43

I installed Git LFS:

  1. conda install git-lfs -c conda-forge
  2. git-lfs install

Then the isaura:

  1. git clone https://github.com/ersilia-os/isaura.git
  2. cd isaura
  3. pip install -e .

Then it was Ersilia:

  1. conda create -n ersilia python=3.9
  2. conda activate ersilia
  3. git clone https://github.com/ersilia-os/ersilia.git
  4. cd ersilia
  5. pip install -e .

I'm with the anaconda environment. conda version 22.9.0

GemmaTuron commented 1 year ago

Thanks @natividadesusana !

I see the conda environment for ersilia is python 3.9 when it should be 3.7, I also see you have both miniconda and anaconda installed?

natividadesusana commented 1 year ago

Thanks @natividadesusana !

I see the conda environment for ersilia is python 3.9 when it should be 3.7, I also see you have both miniconda and anaconda installed?

Looks like so.. I'll fix it!

GemmaTuron commented 1 year ago

Hi @natividadesusana !

Let's work on #411 and when this is solved we can tackle model fetching and predicting. I'll close that issue for the time being.

natividadesusana commented 1 year ago

Right!! Thank you!!