'Why am I getting an error when importing praw?
I'm trying to create a praw script so I can connect to r/memes and have my bot send those messages in discord. My code is fine, but whenever I have import praw in my program, I get the following output:
Replit: Updating package configuration
--> python3 -m poetry add praw
Using version ^7.5.0 for praw
Updating dependencies
Resolving dependencies...
AttributeError
__enter__
at /opt/virtualenvs/python3/lib/python3.8/site-packages/poetry/utils/helpers.py:98 in download_file
94│ url, dest, session=None, chunk_size=1024
95│ ): # type: (str, str, Optional[requests.Session], int) -> None
96│ get = requests.get if not session else session.get
97│
→ 98│ with get(url, stream=True) as response:
99│ response.raise_for_status()
100│
101│ with open(dest, "wb") as f:
102│ for chunk in response.iter_content(chunk_size=chunk_size):
exit status 1
Replit: Package operation failed.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
