Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'pyarrow' has no attribute 'Column' #12

Closed
dazzag24 opened this issue Nov 12, 2019 · 4 comments
Closed

AttributeError: module 'pyarrow' has no attribute 'Column' #12

dazzag24 opened this issue Nov 12, 2019 · 4 comments

Comments

@dazzag24
Copy link
Contributor

Thanks for this useful tool!

Not sure if this an error or I am doing something wrong?

Created an new virualenv
pipenv shell

Installed requirements
pipenv install --skip-lock pyarrow csv2parquet

Attempted to convert simple csv using simplest invocation as I want all rows and columns

> csv2parquet a.csv
Traceback (most recent call last):
  File "/home/xxx/.local/share/virtualenvs/csv2parquet-tyfa8dfH/bin/csv2parquet", line 8, in <module>
    sys.exit(main())
  File "/home/xxx/.local/share/virtualenvs/csv2parquet-tyfa8dfH/lib/python3.6/site-packages/csv2parquet/csv2parquet.py", line 247, in main
    main_with_args(convert, sys.argv[1:])
  File "/home/xxx/.local/share/virtualenvs/csv2parquet-tyfa8dfH/lib/python3.6/site-packages/csv2parquet/csv2parquet.py", line 244, in main_with_args
    args.type)
  File "/home/xxx/.local/share/virtualenvs/csv2parquet-tyfa8dfH/lib/python3.6/site-packages/csv2parquet/csv2parquet.py", line 157, in convert
    for x in range(len(fields)) if keep[x]]
  File "/home/xxx/.local/share/virtualenvs/csv2parquet-tyfa8dfH/lib/python3.6/site-packages/csv2parquet/csv2parquet.py", line 157, in <listcomp>
    for x in range(len(fields)) if keep[x]]
AttributeError: module 'pyarrow' has no attribute 'Column'

python --version Python 3.6.8

more Pipfile

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
pyarrow = "*"
csv2parquet = "*"

[requires]
python_version = "3.6"```

@dazzag24
Copy link
Contributor Author

I think that "Column" has been removed in the 0.15 release of PyArrow.

apache/arrow#4841
apache/arrow@c350bba

@cldellow
Copy link
Owner

D'oh, thanks for the bug report and pointers!

I might have time to look at patching this to use the new interfaces this weekend, or failing that, the next. Someone submitted a PR for another project of mine to upgrade it, and it doesn't look too big of a change.

If you need to get unblocked in the interim, you could clone the repo and patch the Pipfile to use a specific, older version of pyarrow.

@cldellow
Copy link
Owner

Hey @dazzag24, thanks again for the report!

This should be fixed by 2e21226, which is now published to pypi as v0.0.8.

@dazzag24
Copy link
Contributor Author

Many thanks!

I have tested and can confirm that this now works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants