abi / screenshot-to-code

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

Home Page:https://screenshottocode.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve error handling with OpenAI

yellow1912 opened this issue · comments

First of all, this is a very exciting project. Thank you for sharing.

I'm running into this issue when I try my first screenshot conversion:

ERROR: Exception in ASGI application

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not yet valid (_ssl.c:1007)

(There are many error lines but I believe these are the most important)

Edit: this could be an issue with openai itself

https://status.openai.com/

image

Can you post your full logs? Is this happening when you trying to connect to OpenAI?

I'm sorry I dont have the log anymore. Yesterday openai was down for a few minutes and that was when I experienced the error (I only knew about that when I checked their website later). I think you can place a try catch when you attempt to connect to openai and returns an error message if the connection fails.

Nice, so it's working for you now?

yes it is working perfectly, thank you for your effort. I'm quite happy with the result.