I am having the error below and I am not sure how to fix it. I know it has something to do with my imports but I am not sure what needs to be done in order to fix this issue.
Traceback (most recent call last):
File "WebOutput.py", line 1, in <module>
import DatabaseInteractor
File "/Users/yaminhimani/Desktop/tweetybird/DatabaseInteractor.py", line 3, in <module>
import WebOutput
File "/Users/yaminhimani/Desktop/tweetybird/WebOutput.py", line 4, in <module>
db = DatabaseInteractor.DatabaseInteractor()
AttributeError: partially initialized module 'DatabaseInteractor' has no attribute 'DatabaseInteractor' (most likely due to a circular import)
WebOutput.py file
import DatabaseInteractor
import nltk
db = DatabaseInteractor.DatabaseInteractor()
class WebOutput:
def __init__(self,text):
self.text= text
#self.hashtag = input("Enter Hashtag")
DataInteractor.py file
import mysql.connector
import Tweet
import WebOutput
import re
class DatabaseInteractor:
def __init__(self):
# connects to the mysql server
# config settings should be changed based on where you are trying to connect (they are currently set for my local sql server)
config = {
}