Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [WinError 87] The parameter is incorrect #355

Open
E-STAT opened this issue Jan 26, 2021 · 1 comment
Open

OSError: [WinError 87] The parameter is incorrect #355

E-STAT opened this issue Jan 26, 2021 · 1 comment

Comments

@E-STAT
Copy link

E-STAT commented Jan 26, 2021

I am trying to use twitterscraper for the first time. I ran the sample code in the ReadMe as below:

from twitterscraper import query_tweets

if __name__ == '__main__':
    list_of_tweets = query_tweets("Sunday Igboho", 10)

    #print the retrieved tweets to the screen:
    for tweet in query_tweets("Sunday Igboho", 10):
        print(tweet)

    #Or save the retrieved tweets to file:
    file = open("output.txt","w")
    for tweet in query_tweets("Sunday Igboho", 10):
        file.write(str(tweet.text.encode('utf-8')))
    file.close()

And I got the following error logs:

Thread 'Supervisor' crashed: AttributeError("'IMapUnorderedIterator' object has no attribute '_write_to'")
Traceback (most recent call last):
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\pool.py", line 504, in run
    return self.body()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\pool.py", line 556, in body
    pool._maintain_pool()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\pool.py", line 1342, in _maintain_pool
    joined = self._join_exited_workers()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\pool.py", line 1234, in _join_exited_workers
    write_to = job._write_to
AttributeError: 'IMapUnorderedIterator' object has no attribute '_write_to'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 123, in steal_handle
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 165, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 207, in _main
    self = pickle.load(from_parent)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 1027, in rebuild_pipe_connection
    return PipeConnection(detach(dh), readable, writable)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 550, in detach
    return sock.detach()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 166, in detach
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 165, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 207, in _main
    self = pickle.load(from_parent)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 1027, in rebuild_pipe_connection
    return PipeConnection(detach(dh), readable, writable)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 550, in detach
    return sock.detach()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 166, in detach
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 123, in steal_handle
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 123, in steal_handle
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 123, in steal_handle
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 165, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 207, in _main
    self = pickle.load(from_parent)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 1027, in rebuild_pipe_connection
    return PipeConnection(detach(dh), readable, writable)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 550, in detach
    return sock.detach()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 166, in detach
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 123, in steal_handle
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 165, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 207, in _main
    self = pickle.load(from_parent)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 1027, in rebuild_pipe_connection
    return PipeConnection(detach(dh), readable, writable)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 550, in detach
    return sock.detach()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 166, in detach
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 165, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 207, in _main
    self = pickle.load(from_parent)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 1027, in rebuild_pipe_connection
    return PipeConnection(detach(dh), readable, writable)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\connection.py", line 550, in detach
    return sock.detach()
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 166, in detach
    return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect
(venv)
user@DESKTOP-DE4GDBG MINGW64 ~/twitter_scraper_test
$ Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "C:\Users\user\twitter_scraper_test\venv\lib\site-packages\billiard\reduction.py", line 120, in steal_handle
    source_process_handle = _winapi.OpenProcess(
OSError: [WinError 87] The parameter is incorrect

I read about the error and got to know it's a Windows OS problem. Please, what can I do to resolve it?

Thanks for your answers in advance.

@baran-ozer
Copy link

baran-ozer commented Mar 25, 2021

looks like this package don't work anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants