Hello!
I've found out about twint a couple of days ago and I tried a bit, specially to download users' post. I'm having trouble, however, with scraping tweets from search. I keep getting this error: OSError: [WinError 87] Par芒metro incorreto.
Here's the full command message error:
Traceback (most recent call last):
File "C:\Users\IBPAD\AppData\Local\Programs\Python\Python36\Scripts\twint-script.py", line 11, in
load_entry_point('twint==2.1.2', 'console_scripts', 'twint')()
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\cli.py", line 295, in run_as_command
main()
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\cli.py", line 287, in main
run.Search(c)
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\run.py", line 292, in Search
run(config, callback)
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\run.py", line 213, in run
get_event_loop().run_until_complete(Twint(config).main(callback))
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\asyncio\base_events.py", line 484, in run_until_complete
return future.result()
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\run.py", line 154, in main
await task
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\run.py", line 198, in run
await self.tweets()
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\run.py", line 145, in tweets
await output.Tweets(tweet, self.config, self.conn)
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\output.py", line 142, in Tweets
await checkData(tweets, config, conn)
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\output.py", line 129, in checkData
_output(tweet, output, config)
File "c:\users\ibpad\appdata\local\programs\python\python36\lib\site-packages\twint\output.py", line 91, in _output
print(output)
OSError: [WinError 87] Par芒metro incorreto
1178453706179825666 2019-09-29 20:37:12 Hora oficial do Brasil <_marjorielemos> matei a vontade de comer ''croasonho'' 锟紼xception ignored in: <_io.TextIOWrapper name='
OSError: [WinError 87] Par芒metro incorreto
It runs a bit and then it stops. Here's the simple command I used: twint -s croasonho -o croasonho.csv --csv
I think it might have something to do with enconding, but I'm not sure and I don't really know how to look into it (I'm not very familiar with Python). I use Windows and Python 3.6.8.
Thanks!
It seems related specifically to your OS and not Twint
I don't run Windows so I might not be able to help you
I met same problem too, and I do not know how to solve.
I'm running twint on windows. Try running as admin. Google translate is giving `matei a vontade de comer ''croasonho' asI killed the urge to eat croasonho`
So I'm going to go with its being limited by environment.
I faced the same problem. I added -ho and it works. No idea why.
before : twint -g="-6.405800, 106.064000, 50km" --since 2019-06-01 --until 2019-06-30 -o banten062019.csv --csv
after : twint -g="-6.405800, 106.064000, 50km" --since 2019-06-01 --until 2019-06-30 -o banten062019.csv --csv -ho
-ho/--hide-output works because twint is not printing to stdout, thus not calling the function that rises the error
Most helpful comment
-ho/--hide-outputworks because twint is not printing to stdout, thus not calling the function that rises the error