-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
odo.odo fails on Windows when inserting a CSV file into a (sqlite) database due to networkx 2.0.
- Windows 10
- Python 2.7.14
odo (and networkx) installed/upgraded via command pip install --upgrade odo.
odo 0.5.0 with networkx 2.0:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import odo
C:\Python27\lib\site-packages\odo\backends\pandas.py:94: FutureWarning: pandas.tslib is deprecated and will be removed i
n a future version.
You can access NaTType as type(pandas.NaT)
@convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
>>> odo.odo("pets.csv", "sqlite:///foo.db::Pets")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\odo\odo.py", line 91, in odo
return into(target, source, **kwargs)
File "C:\Python27\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
return func(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\into.py", line 43, in wrapped
return f(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\into.py", line 149, in into_string_string
return into(a, resource(b, **kwargs), **kwargs)
File "C:\Python27\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
return func(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\into.py", line 43, in wrapped
return f(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\into.py", line 143, in into_string
return into(a, b, dshape=dshape, **kwargs)
File "C:\Python27\lib\site-packages\multipledispatch\dispatcher.py", line 164, in __call__
return func(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\into.py", line 43, in wrapped
return f(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\into.py", line 131, in into_object
return append(target, source, dshape=dshape, **kwargs)
File "C:\Python27\lib\site-packages\multipledispatch\dispatcher.py", line 171, in __call__
return func(*args, **kwargs)
File "C:\Python27\lib\site-packages\odo\backends\sql.py", line 493, in append_anything_to_sql_Table
return append(t, convert(Iterator, o, **kwargs), **kwargs)
File "C:\Python27\lib\site-packages\odo\core.py", line 44, in __call__
return _transform(self.graph, *args, **kwargs)
File "C:\Python27\lib\site-packages\odo\core.py", line 57, in _transform
ooc_types=ooc_types)
File "C:\Python27\lib\site-packages\odo\core.py", line 94, in path
for src, tgt in zip(pth, pth[1:])]
AttributeError: 'SubDiGraph' object has no attribute 'edge'
>>> quit()
odo 0.5.0 with networkx 1.11:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import odo
C:\Python27\lib\site-packages\odo\backends\pandas.py:94: FutureWarning: pandas.tslib is deprecated and will be removed i
n a future version.
You can access NaTType as type(pandas.NaT)
@convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))
>>> odo.odo("pets.csv", "sqlite:///foo.db::Pets")
Table('Pets', MetaData(bind=Engine(sqlite:///foo.db)), Column('Cats', BIGINT(), table=<Pets>, nullable=False), Column('D
ogs', BIGINT(), table=<Pets>, nullable=False), schema=None)
>>> quit()
This does not appear to be a problem on OS X. I have not verified the behavior on Linux.
shntnu, makmanalp, mythnc, WR-Long and gRichardson108
Metadata
Metadata
Assignees
Labels
No labels