以下命令:
from odo import odo
odo(target='postgresql://{user}:{pass}@localhost/{server}::odo_dest_table',source='/home/username/Downloads/large_csv.csv')
产生以下错误:
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/odo.py", line 91, in odo
return into(target, source, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/multipledispatch/dispatcher.py", line 278, in __call__
return func(*args, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/into.py", line 43, in wrapped
return f(*args, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/into.py", line 149, in into_string_string
return into(a, resource(b, **kwargs), **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/multipledispatch/dispatcher.py", line 278, in __call__
return func(*args, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/into.py", line 43, in wrapped
return f(*args, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/into.py", line 138, in into_string
dshape = discover(b)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/multipledispatch/dispatcher.py", line 278, in __call__
return func(*args, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/backends/csv.py", line 377, in discover_csv
df = csv_to_dataframe(c, nrows=nrows, **kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/backends/csv.py", line 295, in csv_to_dataframe
return _csv_to_dataframe(c, dshape=dshape, chunksize=chunksize,
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/backends/csv.py", line 346, in _csv_to_dataframe
kwargs = keyfilter(keywords(pd.read_csv).__contains__, kwargs)
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/site-packages/odo/utils.py", line 130, in keywords
return inspect.getargspec(func).args
File "/home/username/anaconda3/envs/odosimple/lib/python3.8/inspect.py", line 1083, in getargspec
raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them
Process finished with exit code 1
git clone
我使用 pip ( -> )从 git 存储库安装到 conda env 中pip install .
。