Open justquick opened 1 year ago
hey @justquick we're pretty confused about this one
there's no reference of ProsusAI anywhere in Marvin
not sure if there's some weird config or virtualenv thing going on - I don't think we're colliding with some env variable you might have set. Is there a world where you can try in a fresh venv?
Yea this is def very weird. It happens in every venv no matter whether it's pip, pipenv, hatch, poetry, etc. For some reason openai? is looking for ProsusAI/finbert model probably from huggingface but nothing in my env defines prosus and i cant find anything mentioning it in ~/.config
or ~/Library/Application Suppor
. The confusing thing is that why is it trying to load a model when it's hitting pydantic directly and not going through the openai package first?
Anyway it's curious but i think you can safely close this ticket as im sure it's related to my rats nest of a dev env. If you are still curios here are a few more details
Im also seeing a warning related to dotenv on the pip install:
$ mkvirtualenv marv # virtualenvwrapper shortcut
...
$ pip install marvin
...
WARNING: pydantic 2.4.2 does not provide the extra 'dotenv'
...
install passes but the first roadblock i hit is w/ dotenv after install running marvin
$ marvin
Traceback (most recent call last):
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 330, in read_env_file
from dotenv import dotenv_values
ModuleNotFoundError: No module named 'dotenv'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/jquick/.local/share/virtualenvs/marv/bin/marvin", line 5, in <module>
from marvin.cli import app
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/marvin/__init__.py", line 1, in <module>
from .settings import settings
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/marvin/settings.py", line 131, in <module>
class Settings(MarvinBaseSettings):
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/marvin/settings.py", line 152, in Settings
openai: OpenAISettings = OpenAISettings()
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 41, in __init__
**__pydantic_self__._build_values(
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 76, in _build_values
return deep_update(*reversed([source(self) for source in sources]))
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 76, in <listcomp>
return deep_update(*reversed([source(self) for source in sources]))
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 177, in __call__
dotenv_vars = self._read_env_files(settings.__config__.case_sensitive)
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 226, in _read_env_files
read_env_file(env_path, encoding=self.env_file_encoding, case_sensitive=case_sensitive)
File "/Users/jquick/.local/share/virtualenvs/marv/lib/python3.10/site-packages/pydantic/v1/env_settings.py", line 332, in read_env_file
raise ImportError('python-dotenv is not installed, run `pip install pydantic[dotenv]`') from e
ImportError: python-dotenv is not installed, run `pip install pydantic[dotenv]`
running pip install pydantic[dotenv]
doesnt fix the issue so i run pip install python-dotenv
instead
hi @justquick - are you fine with us closing this issue?
First check
Bug summary
Using latest 1.5.6 release, im having issues doing the quickstart guide and simply doing
import marvin
blows up. The error is related to the ProsusAI which i do not use.Reproduction
Error
Versions
Additional context
No response