-2

I got this error:

 from fake_useragent import UserAgent File "D:\Kerja\HIT\Python Projects\Ongoing Projects\Andrew Mancilla\mancilla-env\lib\site-packages\fake_useragent\__init__.py", line 4, in <module> from fake_useragent.fake import FakeUserAgent, UserAgent File "D:\Kerja\HIT\Python Projects\Ongoing Projects\Andrew Mancilla\mancilla-env\lib\site-packages\fake_useragent\fake.py", line 8, in <module> from fake_useragent.utils import BrowserUserAgentData, load File "D:\Kerja\HIT\Python Projects\Ongoing Projects\Andrew Mancilla\mancilla-env\lib\site-packages\fake_useragent\utils.py", line 42, in <module> def load() -> list[BrowserUserAgentData]: TypeError: 'type' object is not subscriptable 

How to remove that error?

My spec

scrape-fake-useragent==1.4.4 fake-useragent==2.0.0 Scrapy==2.11.2 Python 3.8 

1 Answer 1

-1

The error is caused by module fake-useragent==2.0.0 requires Python 3.9 while I still use Python 3.8. It's solved by downgrading it to fake-useragent==1.5.1

Sign up to request clarification or add additional context in comments.

1 Comment

Note that Python 3.8 support has ended 4 months ago.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.