can someone help me please every time i import something i get this error message
Traceback (most recent call last):
File "main.py", line 3, in <module>
from aiohttp import web, FileResponse
ImportError: cannot import name 'FileResponse' from 'aiohttp' (/opt/virtualenvs/python3/lib/python3.8/site-packages/aiohttp/__init__.py)
9pfs1
April 9, 2023, 10:18pm
2
Could you re-add the backticks? It made your post easier to read.
this is in python by the way
could this be related to the active incident happening in the replit servers?
9pfs1
April 9, 2023, 10:23pm
5
I noticed that the error mentions /opt/virtualenvs/python3/
, are you using python locally?
9pfs1
April 9, 2023, 10:24pm
7
What repl has things in /opt
? Could you send a link?
i dont even know what opt is and i cant find it in the repl
9pfs1
April 9, 2023, 10:25pm
9
Could you please send a link to the repl?
Did you change line 3?
Also I see
import aiohttp
from aiohttp import web
Why are you importing web twice?
im not importing web im trying to import fileresponse
You an importing first the entire lib and then only web.
I do not see file response in main
i dont understand what do you mean importing the first lib then web
the link i sent isnt my repl thats the one i forked mine is replit.com/@dbtprods/ping
Ok. Did you try web.fileresponse() or it is another fileresponse?
thanks for the help i fixed it the package name was web_fileresponse not FileResponse
Good. Glad it helped.
If my post solved your problem, please mark it as the solution so the thread can close.
1 Like