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

Issue with windows select.poll replacement #9

Open
ChristofferNorgaard opened this issue Oct 31, 2020 · 0 comments
Open

Issue with windows select.poll replacement #9

ChristofferNorgaard opened this issue Oct 31, 2020 · 0 comments

Comments

@ChristofferNorgaard
Copy link

When trying to use imaplib2.py3 for python 3 on windows I get the following error.

14:55.51 MainThread imaplib2 version 3.05
  14:55.51 MainThread imaplib2 debug level 5, buffer level 3
  14:55.60 MainThread connected to imap.gmail.com on port 993
  14:55.60 imap.gmail.com writer starting
  14:55.60 imap.gmail.com reader starting using select
  14:55.60 MainThread _request_push(continuation, welcome, {}) = b'JEEP0'
  14:55.60 MainThread welcome:b'JEEP0'.ready.wait
  14:55.63 imap.gmail.com reader select => [1640], [], []
  14:55.63 imap.gmail.com reader rcvd 67
  14:55.63 imap.gmail.com reader < '* OK Gimap ready for requests from 89.212.201.191 u4mb45497943wmg\r\n'
  14:55.70 imap.gmail.com handler starting
Exception in thread imap.gmail.com handler:
Traceback (most recent call last):
  File "C:\Users\Jakob\AppData\Local\Programs\Python\Python39\lib\threading.py", line 950, in _bootstrap_inner
    self.run()
  File "C:\Users\Jakob\AppData\Local\Programs\Python\Python39\lib\threading.py", line 888, in run
    self._target(*self._args, **self._kwargs)
  File "F:\documents\coding_projects\2019\forwarding\v2\forwardingV2\imaplib3.py", line 1735, in _handler
    typ, val = line
ValueError: too many values to unpack (expected 2)

After a day of troubleshooting I think the source of the problem is _reader function.
It is (if I understand correctly) defined 2 ways - if hasattr(select_module, "poll") for linux or the other one for windows.
So I tried the same code on WSL and it worked fine.

This leads me to believe that there is some error in the version of _reader for windows (the one not using poll).

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

1 participant