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

Error handling for NA #136

Open
Frijol opened this issue Oct 12, 2021 · 0 comments · May be fixed by edgi-govdata-archiving/ECHO_modules#32
Open

Error handling for NA #136

Frijol opened this issue Oct 12, 2021 · 0 comments · May be fixed by edgi-govdata-archiving/ECHO_modules#32
Labels
bug Something isn't working hacktoberfest

Comments

@Frijol
Copy link
Contributor

Frijol commented Oct 12, 2021

We need graceful error handling for different types of null value that may be returned, in this case NA in cell 5 of the Cross-Programs notebook.

Notebook: https://colab.research.google.com/github/edgi-govdata-archiving/ECHO-Cross-Program/blob/main/ECHO-Cross-Programs.ipynb#scrollTo=tGG4dLXuaRLN

To reproduce: County > WA > Snohomish > run cell 5

select * from "ECHO_EXPORTER" where "FAC_STATE" = 'WA' and "FAC_COUNTY" in ('SNOHOMISH') and "FAC_ACTIVE_FLAG" = 'Y'
http://portal.gss.stonybrook.edu/echoepa/?query=select+%2A+from+%22ECHO_EXPORTER%22+where+%22FAC_STATE%22+%3D+%27WA%27+and+%22FAC_COUNTY%22+in+%28%27SNOHOMISH%27%29+and+%22FAC_ACTIVE_FLAG%22+%3D+%27Y%27&pg
<matplotlib.axes._subplots.AxesSubplot at 0x7f5a1c1fd9d0>
<matplotlib.axes._subplots.AxesSubplot at 0x7f5a1b981290>
TypeError: boolean value of NA is ambiguous
None
Error in callback <function install_repl_displayhook.<locals>.post_execute at 0x7f5a3167a830> (for post_execute):
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/matplotlib/pyplot.py in post_execute()
    107             def post_execute():
    108                 if matplotlib.is_interactive():
--> 109                     draw_all()
    110 
    111             # IPython >= 2

13 frames
/usr/local/lib/python3.7/dist-packages/matplotlib/text.py in set_text(self, s)
   1163         if s is None:
   1164             s = ''
-> 1165         if s != self._text:
   1166             self._text = str(s)
   1167             self.stale = True

pandas/_libs/missing.pyx in pandas._libs.missing.NAType.__bool__()

TypeError: boolean value of NA is ambiguous

Potentially related: #133

@Frijol Frijol added bug Something isn't working hacktoberfest labels Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant