Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

ooi.view_site() warning message #94

Open
robfatland opened this issue Mar 11, 2019 · 3 comments
Open

ooi.view_site() warning message #94

robfatland opened this issue Mar 11, 2019 · 3 comments

Comments

@robfatland
Copy link
Contributor

This code

from yodapy.datasources import OOI
ooi = OOI()
ooi.view_sites()

gives this warning...

/opt/conda/lib/python3.6/site-packages/grequests.py:21: RuntimeWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. Please monkey-patch earlier.
  curious_george.patch_all(thread=False, select=False)
100% |###################################################|Time elapsed: 0:00:12

in the Port Cormorack Jupyter Hub

@lsetiawan
Copy link
Contributor

Thanks!

@robfatland
Copy link
Contributor Author

robfatland commented Jun 12, 2019

Source repo https://github.com/robfatland/synoptic and sub-folder 'rco' usying notebook yodapy.ipynb. Testing on the pangeo/NASA JupyterHub.

Revisiting this: It appears the "dataframe can't be evaluated" issue is still present even with the git+https://github.com/cormorack/yodapy.git install... so I broke this down a bit more from ooi.sites; ooi.instruments; ooi.sites after install and declaring ooi=OOI()

import yodapy
from yodapy.datasources import OOI
print(yodapy.__version__)

0.2.4-beta

ooi=OOI()
ooi.sites

-> gives "Insecure Request Warning" followed by a proper table and then more such warnings

ooi.instruments

works properly, no errors, no warnings, just the table; then

ooi.sites

produces a lot of grief:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-9-aa8629e4a080> in <module>
----> 1 ooi.sites

/srv/conda/envs/notebook/lib/python3.6/site-packages/yodapy/datasources/ooi/OOI.py in sites(self)
    165     def sites(self):
    166         """ Returns the OOI sites """
--> 167         if not isinstance(self._sites, pd.DataFrame):
    168             try:
    169                 self._sites = pd.read_csv(self._OOI_PORTAL_SITES).dropna(subset=[  # noqa

/srv/conda/envs/notebook/lib/python3.6/site-packages/pandas/core/generic.py in __nonzero__(self)
   1476         raise ValueError("The truth value of a {0} is ambiguous. "
   1477                          "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
-> 1478                          .format(self.__class__.__name__))
   1479 
   1480     __bool__ = __nonzero__

ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

@lsetiawan
Copy link
Contributor

@robfatland I am not getting the errors you see. Can I have access to the jupyterhub you're using...?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants