For loop in twython search results raises StopIteration #522
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#522
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I'm very new at python and I'm trying to search the results of my twitter query.
When I do, once the end of the generator is reached, my entire code stops from a runtime error raised by a StopIteration.
Upon researching, this is a new thing in Python 3.7 (which is what I'm using for this project) where instead of just continuing on once a StopIteration has been met, it stops the entire script from running.
So my question is, are there any ways to either provide a list of how many results there are or a way to exception out the StopIteration from presenting itself so I can continue running my code?
Thank you in advance
I have this same issue. It's quite annoying.
I think I can send a PR, it just requires removing explicit raising of StopIteration and replacing by a
return.A current workaround consists in catching all runtime errors, and doing
'generator raised StopIteration' in str(e)and swallowing this exception otherwise re-raising it.Relevant PEP: https://www.python.org/dev/peps/pep-0479/
Also running into this with Python 3.7. The last commit is from April 2019, is this project still maintained?
Hmmm, @RaitoBezarius is that offer for a PR still good?
Real life (+ most of my projects not being in Python these days) means this isn't seeing as much attention as is ideal... but I can try to carve out time to merge some outstanding PRs and bug fixes if they're lined up.
I'm also happy to grant someone else access to the project to help with this stuff. Pretty sure we've come close to finding people before but generally fizzles out... such is the nature of open source work sometimes.
@ryanmcgrath Of course! :)
Though, I would love to give a hand whenever I can, but I'm not sure this qualify to granting me access to the project :) — I'm myself a prisoner of real life :P
I second this, sorry to all; I just haven't had the time to invest in this project in the recent years :(
@RaitoBezarius Heya, did you still want to look at a PR here?
Hello, I am still having the same issue on python 3.8.5
If you want, I can do a little digging and do a PR, but also wanted to know if anyone found a workaround