Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5060

How to fix: AttributeError: module 'twint' has no attribute 'config'

$
0
0

I have installed twint with:

pip3 install twint

which resulted in a successful installation:

Successfully installed twint-2.1.8

It works to get tweets from twitter using Command Prompt(CLI) commands but when I try to run the example in Spyder IDE it gives me the error:

"Traceback (most recent call last):     File "<ipython-input-13-7b77905cef0c>", line 1, in <module>        runfile('C:/Users/myname/twint.py', wdir='C:/Users/myname')      File "C:\Users\myname\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile       execfile(filename, namespace)      File "C:\Users\myname\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile        exec(compile(f.read(), filename, 'exec'), namespace)      File "C:/Users/myname/twint.py", line 8, in <module>        import twint      File "C:\Users\myname\twint.py", line 9, in <module>        c = twint.Config()    AttributeError: module 'twint' has no attribute 'Config'

Here is my code:

import twintc = twint.Config()c.Username = "twitterAccountName"twint.run.Search(c)

However, I looked twint related issues on GitHub found here but the solution provided here not worked for me. Does anyone know where the error coming from? How do I fix it?


Viewing all articles
Browse latest Browse all 5060


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>