Open ericxyun opened 5 years ago
I am having the same error: AttributeError: module 'ntpath' has no attribute 'splitunc'
I am running this on Ubuntu
I'm also getting the same error. I'm using MacOS 10.14.3
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/restifo/PycharmProjects/bulk-rnaseq/util.py", line 5, in <module>
df = paratext.load_csv_to_pandas("./data/TcgaTargetGtex_RSEM_Hugo_norm_count", num_threads=7)
File "/Users/restifo/anaconda3/envs/bulk-rnaseq/lib/python3.7/site-packages/paratext/core.py", line 403, in load_csv_to_pandas
return pandas.DataFrame.from_items(expanded)
File "/Users/restifo/anaconda3/envs/bulk-rnaseq/lib/python3.7/site-packages/pandas/core/frame.py", line 1782, in from_items
keys, values = lzip(*items)
File "/Users/restifo/anaconda3/envs/bulk-rnaseq/lib/python3.7/site-packages/paratext/core.py", line 355, in load_csv_to_expanded_columns
for name, col, semantics, levels in load_raw_csv(filename, *args, **kwargs):
File "/Users/restifo/anaconda3/envs/bulk-rnaseq/lib/python3.7/site-packages/paratext/core.py", line 298, in load_raw_csv
loader = internal_create_csv_loader(filename, *args, **kwargs)
File "/Users/restifo/anaconda3/envs/bulk-rnaseq/lib/python3.7/site-packages/paratext/core.py", line 188, in internal_create_csv_loader
loader.load(_make_posix_filename(filename), params)
File "/Users/restifo/anaconda3/envs/bulk-rnaseq/lib/python3.7/site-packages/paratext/core.py", line 120, in _make_posix_filename
if ntpath.splitdrive(fn_or_uri)[0] or ntpath.splitunc(fn_or_uri)[0]:
AttributeError: module 'ntpath' has no attribute 'splitunc'
Python version:
> print(sys.version)
3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 15:43:19)
[Clang 4.0.1 (tags/RELEASE_401/final)]
I'm having the same error with the same setup as @a-re . I'm also having the error when using load_csv_to_dict
Notes to self after fixing this. Or if anyone else wants to make a PR off this, feel free!
(is this library still maintained by anyone?)
splitunc is deprecated. need to use splitdrive
instead. source:
https://github.com/aaronryank/-/blob/master/workspace/MSYS2_64/usr/lib/python3.4/ntpath.py
Also need to change pd.DataFrame.from_items
to pd.DataFrame.from_dict
Thank you in advanced for your time.
I'm trying to load a csv file with:
I'm getting a:
I am able to load the csv file with the traditional method using
pd.read_csv()
.Full Error Output:
Thank you again for your time.