Traceback (most recent call last):
File âC:\Users\Facu\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Scripts\anti_h_bot\praw.pyâ, line 1, in
import praw
File âC:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Scripts\anti_h_bot\praw.pyâ, line 3, in
reddit = praw.Reddit(
AttributeError: partially initialized module âprawâ has no attribute âRedditâ (most likely due to a circular import)
I would suggest something a little easier. If you are just starting out, I wouldnât recommend jumping in and working on a project like this. First learn the language. There is so much to learn and understand before attempting to work on a project of this scale if youâre just starting out.
Have you tried running it from a non-virtual environment? There have been a few posts from other users on this platform reporting issues when running from third party virtual environments. I would suggest downloading either IDLE or Spyder IDE. Then try running your code from there. But I still recommend learning the Python language first so that you understand a bit more of what you are doing (I am assuming you donât know any other language but who knows, maybe youâre an expert in another language and already comfortable with programming )
What is your IDLE Python version (IDLE is fine)? Spyder is easier and more natural to use.
Note that Spyder comes with Python v3.8. If you do decide to download it, make sure you point your interpreter to v3.12. So it can use the latest version of Python.
@onePythonUser I am sorry, but everything you have said in this thread until now has been a completely distraction from the problem, which @Rosuav correctly identified in their post. You are still a new user of python, and you do not have enough experience to be helpful for most people tbh.
@crispybeatle What you are running into is the same as this issue, just with praw instead of requests. Donât name the file you directly want to execute the same as the library you want to use.
Yes, but I think that was a miscommunication. The file should not be named praw.py, but the traceback they posted showed that the file is clearly called praw.py
Traceback (most recent call last):
File âC:\Users\name\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\Roaming\pypoetry\venv\Scripts\anti_h_bot\index.pyâ, line 3, in
reddit = praw.Reddit(
AttributeError: module âprawâ has no attribute âRedditâ