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.

get_trade_receipt is raising StopIteration

See original GitHub issue

Here’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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
buksoncommented, Jan 27, 2019

Ok fixed it already

0reactions
skulltechcommented, Jan 27, 2019

Awesome!

Read more comments on GitHub >

github_iconTop 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 >

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