ShrimpingIt / medea

Low-overhead JSON tokeniser / lexer / parser library for Micropython and Python3
GNU Affero General Public License v3.0
10 stars 0 forks source link

RuntimeError: generator raised StopIteration #5

Open ChrisH861 opened 4 years ago

ChrisH861 commented 4 years ago

I am trying to get data form the MetOffice API, I have adapted the forecastTokenizeLive example and I know my URL and GET headers are correct and should return data as the work when using the urequests library. However when using medea I get the below error before any data is returned.

line 104, in tokenizeValue 
    byte = gen.send(repeat) \
RuntimeError: generator raised StopIteration

The only thing I can think of is, I have noticed that the MetOffice API doesn't return content-length as part of its header. Am I correct in thinking this a requirement and is there any way of getting it working?