Closed bigfishnew closed 5 months ago
@bigfishnew a couple of clarifications: is it definitely in backend/.env
, not frontend/.env
? In your screenshot, there's a " at the start, I'd recommend removing that.
If you're still having problems, let me know.
Yes, I put it in the "backend/.env" file
@bigfishnew can you get rid of the double quote (") at the start of your .env file?
And after we're done debugging this, please revoke this API key and use a new one so other people don't use your API key.
Without the double quotes, it still gives me an error. Another problem is that when I use Claude3, it also gives me an error if I don't set the OpenAI API Key in the Settings
@bigfishnew thanks for bringing the bug "when I use Claude3, it also gives me an error if I don't set the OpenAI API Key in the Settings" to my attention. I just fixed it.
Unfortunately, I'm not able to replicate your issue with the .env file. It works for me. Can you try directly modifying the code here: https://github.com/abi/screenshot-to-code/blob/7f44228a9582f6e39e8dbcee7598b86328ef7e74/backend/config.py#L6 and let me know if that fixes it?
Just replace "ANTHROPIC_API_KEY" in the configuration file and there will be no error. But the console will raise an Error like this,"PermissionDeniedError: Error code: 403 - {'error': {'type': 'forbidden', 'message': 'Request not allowed'}}" I don't know if it has anything to do with me being in China. I don't know how to configure the agent in this software
Yeah, I don't see China on this list: https://www.anthropic.com/supported-countries
You could try a VPN or proxy. I also just released Claude support to the paid version here: https://screenshottocode.com
I added "ANTHROPIC_API_KEY=s****" to the.env file
"No Anthropic API key found. Please add the environment variable ANTHROPIC_API_KEY to backend/.env"