get_trade_receipt is raising StopIteration
See original GitHub issueHere’s an example
>>> client.get_trade_receipt('2197095902291890837')
Traceback (most recent call last):
File "C:\Users\Sumit\AppData\Local\Programs\Python\Python37-32\lib\site-packages\steampy\utils.py", line 22, in texts_between
start = text.index(begin, stop) + len(begin)
ValueError: substring not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Sumit\AppData\Local\Programs\Python\Python37-32\lib\site-packages\steampy\utils.py", line 26, in texts_between
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Sumit\AppData\Local\Programs\Python\Python37-32\lib\site-packages\steampy\client.py", line 23, in func_wrapper
return func(self, *args, **kwargs)
File "C:\Users\Sumit\AppData\Local\Programs\Python\Python37-32\lib\site-packages\steampy\client.py", line 172, in get_trade_receipt
for item in texts_between(html, "oItem = ", ";\r\n\toItem"):
RuntimeError: generator raised StopIteration
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Why does next raise a 'StopIteration', but 'for' do a normal return?
It is a requirement of iterators; they must raise StopIteration when they are done; in fact, once a StopIteration has been raised, attempting...
Read more >PEP 479 – Change StopIteration handling inside generators
This PEP proposes a change to generators: when StopIteration is raised inside a generator, it is replaced with RuntimeError . (More precisely, this...
Read more >Complete Guide to Python StopIteration - eduCBA
When the specified number of iterations are done, StopIteration is raised by the next method in case of iterators and generators (works similar...
Read more >StopIteration raised every time · Issue #243 · clips/pattern
This introduced a breaking change in the handling of "StopIteration" in generators that was activated by default in Python 3.7. In Python3.6, ...
Read more >Python Stop Iteration - W3Schools
To prevent the iteration to go on forever, we can use the StopIteration statement. In the __next__() method, we can add a terminating...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok fixed it already
Awesome!