Odo 0.5.0 is incompatible with networkx 2.0 on Windows
- Dominant language
- Python
- Stars
- 1k
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
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`.
[test file](https://gist.githubusercontent.com/anonymous/ef02e403b8af9fcfaaea3d6af9459b31/raw/2e1844cb37766345948fe4e561aa8a14f32b2670/pets.csv)
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 "", line 1, in
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=, nullable=False), Column('D
ogs', BIGINT(), table=, nullable=False), schema=None)
>>> quit()
```
This does not appear to be a problem on OS X. I have not verified the behavior on Linux.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.