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

[Python] AttributeError: 'Table' object has no attribute 'GetVectorAsNumpy' #4765

Closed
shopox opened this issue Jun 1, 2018 · 5 comments
Closed
Assignees

Comments

@shopox
Copy link

shopox commented Jun 1, 2018

This commit disables deployment of the package to PyPi server. It has led to some features missing, e.g.:

    def NumbersAsNumpy(self):
        o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
        if o != 0:
>           return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint64Flags, o)
E           AttributeError: 'Table' object has no attribute 'GetVectorAsNumpy'

Thus, now it's impossible to depend on flatbuffers using pip, because it wasn't uploaded for a while.
In my case a dirty workaround could be:

pip install -r requirements.txt
rm -rf fbrepo && git clone https://github.com/google/flatbuffers.git fbrepo && cp -rf fbrepo/python/flatbuffers ./ && rm -rf fbrepo

Is it planned to turn the deployment to PyPi back on again?

@aardappel
Copy link
Collaborator

I'm personally not familiar with the Python eco-system. The script in that commit kept breaking our CI though, so had to be disabled.. if someone knows how to make it more robust, it can be re-enabled.

More discussion here: #4390

@rw who wrote the Python port, @kbrose who wrote the numpy support.

@kbrose
Copy link
Contributor

kbrose commented Jun 1, 2018

cc @mikeholler who wrote pypi publishing PR

I believe the only problem was making sure those who have the necessary pypi credentials are able to put them into the travis configuration (encrypted of course). I'm not familiar with that process, though, so can't add much.

EDIT: This is the better link for tracking disucssion: #4516

@rw rw self-assigned this Jul 26, 2018
@monktastic
Copy link

For posterity: installing flatbuffers==1.9 fixed this particular error for me. It seems that the naming convention in PyPI changed from YYYYmmdd to semver, pushing 1.9 behind all the 2015xxxx.

@aardappel
Copy link
Collaborator

Ah yes, that was discussed at length here: #4507 and apparently there is no easy way to fix that. I think that after 1.9 has been out for a while, we should delete the old YYYYmmdd versions, as that will be the only long term fix.

@stale
Copy link

stale bot commented Aug 6, 2019

This issue has been automatically marked as stale because it has not had activity for 1 year. It will be automatically closed if no further activity occurs. To keep it open, simply post a new comment. Maintainers will re-open on new activity. Thank you for your contributions.

@stale stale bot added the stale label Aug 6, 2019
@stale stale bot closed this as completed Aug 20, 2019
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

5 participants