question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Intermittent UnexpectedCommandStatusError from mailbox.fetch()

See original GitHub issue

When looping over fetch, every few or dozens of passes will result in error.

with MailBox('outlook.office365.com').login('xxx', 'xxx') as mailbox:
	for message in mailbox.fetch():
		# do something

quickly or eventually results in…

UnexpectedCommandStatusError(imap_tools.utils.UnexpectedCommandStatusError: Response status for command “box.fetch” == “NO”, “OK” expected, data: [b’The specified message set is invalid.']

  • Python 3,8.1
  • imap-tools==0.13.1

I have added a while loop with catch to try again on error, but I want to make sure there isn’t something else going on.

Are there any known issues with certain services or reasons this might be happening?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ikvkcommented, Apr 14, 2020

I will add more examples for this case

0reactions
ikvkcommented, Apr 14, 2020

Probably Yes. I always collect the necessary changes and perform actions like move after fetch loop. This is not a bug of lib. This is IMAP )

Read more comments on GitHub >

github_iconTop Results From Across the Web

IMAP Error: command FETCH: Invalid messageset
Error in IMAP command FETCH: Invalid messageset: This error is caused by a well-known bug in the IMAP implementation used by your email...
Read more >
Error in IMAP command FETCH: Invalid messageset (0.000 + ...
The IMAP server replied to the 'FETCH' command with a 'BAD' response: Error in IMAP command FETCH: Invalid messageset (0.000 + 0.041 +...
Read more >
Getting the server error message from the fetch api when ...
The Unexpected end of JSON input error means that something went wrong converting the body of the server's response from text to a...
Read more >
Web service error codes (Microsoft Dataverse) - Power Apps
Message: An unexpected error occurred while processing the Fetch data set. 0x8004832d -2147187923, Name: ConvertReportToCrmError
Read more >
Document - intelLinux RH7 OpenMail B.07.00 September 03 ...
This client seems to issue a fetch command with a UID 2 greater than he actual value in the above case. CR: JAGae72697...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found