Python import error

can someone help me please every time i import something i get this error message

Traceback (most recent call last):
  File "", 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/

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?

I noticed that the error mentions /opt/virtualenvs/python3/, are you using python locally?

no i forked this repl

What repl has things in /opt? Could you send a link? :eyes:

i dont even know what opt is and i cant find it in the repl

Could you please send a link to the repl?

have you found anything?

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

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