-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
On Colab, Windows, Linux, all on different networks, this service is now being blocked. It runs once, but any subsequent calls result in 500 Internal Service Error.
Example code
import quantumrandom
print(quantumrandom.get_data()) # Prints random number first time, 500 any time after
listn = quantumrandom.get_data(data_type='uint16', array_length=5)
print(listn) # Always gives 500 error as it runs after first callHere is the stacktrace from Colab which seems more detailed then cmd or terminal:
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
[<ipython-input-4-8ea9948681cd>](https://localhost:8080/#) in <cell line: 3>()
1 import quantumrandom
2
----> 3 print(quantumrandom.get_data())
4
5 listn = quantumrandom.get_data(data_type='uint16', array_length=5)
7 frames
[/usr/local/lib/python3.9/dist-packages/quantumrandom/__init__.py](https://localhost:8080/#) in get_data(data_type, array_length, block_size)
58 'size': block_size,
59 })
---> 60 data = get_json(url)
61 assert data['success'] is True, data
62 assert data['length'] == array_length, data
[/usr/local/lib/python3.9/dist-packages/quantumrandom/__init__.py](https://localhost:8080/#) in get_json(url)
75 else:
76 def get_json(url):
---> 77 return json.loads(urlopen(url).read().decode('ascii'))
78
79
[/usr/lib/python3.9/urllib/request.py](https://localhost:8080/#) in urlopen(url, data, timeout, cafile, capath, cadefault, context)
212 else:
213 opener = _opener
--> 214 return opener.open(url, data, timeout)
215
216 def install_opener(opener):
[/usr/lib/python3.9/urllib/request.py](https://localhost:8080/#) in open(self, fullurl, data, timeout)
521 for processor in self.process_response.get(protocol, []):
522 meth = getattr(processor, meth_name)
--> 523 response = meth(req, response)
524
525 return response
[/usr/lib/python3.9/urllib/request.py](https://localhost:8080/#) in http_response(self, request, response)
630 # request was successfully received, understood, and accepted.
631 if not (200 <= code < 300):
--> 632 response = self.parent.error(
633 'http', request, response, code, msg, hdrs)
634
[/usr/lib/python3.9/urllib/request.py](https://localhost:8080/#) in error(self, proto, *args)
559 if http_err:
560 args = (dict, 'default', 'http_error_default') + orig_args
--> 561 return self._call_chain(*args)
562
563 # XXX probably also want an abstract factory that knows when it makes
[/usr/lib/python3.9/urllib/request.py](https://localhost:8080/#) in _call_chain(self, chain, kind, meth_name, *args)
492 for handler in handlers:
493 func = getattr(handler, meth_name)
--> 494 result = func(*args)
495 if result is not None:
496 return result
[/usr/lib/python3.9/urllib/request.py](https://localhost:8080/#) in http_error_default(self, req, fp, code, msg, hdrs)
639 class HTTPDefaultErrorHandler(BaseHandler):
640 def http_error_default(self, req, fp, code, msg, hdrs):
--> 641 raise HTTPError(req.full_url, code, msg, hdrs, fp)
642
643 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 500: Internal Server Error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels