Open nateGeorge opened 5 years ago
I also encountered this.
How to fix it ? Is there a resolution
Seeing as the build and docs are broken and it hasn't been updated in many months...seems like development has stalled.
I found a fix. In odo/backends/pandas.py line 94, change pd.tslib.NaTType
to type(pd.NaT)
.
Also, the latest version on github has the fix, but I don't know if it's stable,
PR was accepted and merged some time ago: https://github.com/blaze/odo/pull/546
The problem with odo is that no one is preparing releases with the latest code.
On Sat, Apr 20, 2019 at 4:02 PM RYoung notifications@github.com wrote:
I found a fix. In odo/backends/pandas.py line 94, change pd.tslib.NaTType to type(pd.NaT). Should I make a pull request?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blaze/odo/issues/621#issuecomment-485161314, or mute the thread https://github.com/notifications/unsubscribe-auth/AACIRNRZWVBGLOCE3W2KKYTPRNZGRANCNFSM4GX3IOPA .
@timcera yes, If you install the git version, it's working just fine.
I found a fix. In odo/backends/pandas.py line 94, change
pd.tslib.NaTType
totype(pd.NaT)
. Also, the latest version on github has the fix, but I don't know if it's stable,
I was able to import after making the change, thanks!!
@cpcloud @llllllllll Are there any maintainers who could make a new release?
Building Python 3.7.4 with odo-0.5.0
>>> import odo
/app/easybuild/software/Python/3.7.4-foss-2016b-fh1/lib/python3.7/site-packages/odo/backends/pandas.py:94: FutureWarning: pandas.tslib is deprecated and will be removed in a future version.
You can access NaTType as type(pandas.NaT)
@convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
>>> pandas.__version__
'0.23.4'
In [7]: import odo
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-7-c46519caf147> in <module>
----> 1 import odo
~/.local/lib/python3.6/site-packages/odo/__init__.py in <module>
27 from .backends.sas import sas7bdat
28 with ignoring(ImportError):
---> 29 from .backends.pandas import pd
30 with ignoring(ImportError):
31 from .backends.bcolz import bcolz
~/.local/lib/python3.6/site-packages/odo/backends/pandas.py in <module>
92
93
---> 94 @convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
95 def convert_null_or_nat_to_nat(n, **kwargs):
96 return pd.NaT
AttributeError: module 'pandas' has no attribute 'tslib'
In [8]: pandas.__version__
Out[8]: '0.25.1'
In [9]:
When importing this using pandas 0.24 versions, this error occurs: