DaveParr / mtgai

MIT License
2 stars 0 forks source link

FileNotFoundError: No such file or directory (os error 2): data/processed/commanders.parquet #4

Open dabricksta opened 1 week ago

dabricksta commented 1 week ago

~Be gentle, this is my first time using GitHub/creating an issue/contributing to OSS/etc.!~

When running make app, http://localhost:8502/ displays the titled error. Not sure if there is set-up required outside of what the makefile executes - I am happy to contribute to update :)

Cheers @DaveParr !

DaveParr commented 1 week ago

There is!

Totally a failure of documentation. README.MD should include a number of setup steps. In our DMs I had forgotten one of them.

I think the process should currently be:

  1. Clone this repo locally
  2. Setup .env file locally
  3. Run make data to create data/processed/commanders.parquet
  4. Run make app to create a streamlit app session

@dabricksta did you manage to workout how to create a suitable .env file? I don't think that's documented yet either.

dabricksta commented 1 week ago

Not quite! OPEN_AI_KEY is supposed to be a string, right? eg. OPENAI_API_KEY='sk-...' with single quotes. I've tried it with both personal and project api keys, no luck so far.

Right now make data gets me to:

File "/opt/anaconda3/envs/mtgai/lib/python3.11/site-packages/openai/_base_client.py", line 1041, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-a0Dd0***********************************************************************************koQA. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
make: *** [vectorstore] Error 1

edit: well darn, now I'm seeing: openai.AuthenticationError: Error code: 401 - {'error': {'message': 'OpenAI-Organization header should match organization for API key', 'type': 'invalid_request_error', 'param': None, 'code': 'mismatched_organization'}}

I've created a branch called user-2 to collect the fixes as we get me set up using it, but I don't have permission to push yet 🥹