Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bfabric_flask.py errors when order has no associated samples #33

Open
wolski opened this issue Sep 25, 2020 · 0 comments
Open

bfabric_flask.py errors when order has no associated samples #33

wolski opened this issue Sep 25, 2020 · 0 comments

Comments

@wolski
Copy link
Contributor

wolski commented Sep 25, 2020

I am using bfrabic_flask.py to query b-fabric

When running the R code from bfabricShiny

fromJSON("http://localhost:5000/sample/22342")
Error in open.connection(con, "rb") : HTTP error 500.

The flask server (bfabric_shiny.py) produces this error.
This order has no samples. It might be easier to handle the problem if we get an empty list as a result, instead of an error. Not sure.

Traceback (most recent call last):
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\_compat.py", line 39, in reraise
    raise value
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\wewol\AppData\Roaming\Python\Python38\site-packages\flask\app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Users\wewol\prog\bfabricPy\bfabric\scripts\bfabric_flask.py", line 291, in get_all_sample
    for sample in samples:
TypeError: 'NoneType' object is not iterable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant