Skip to content

Fixes truncated error message "C extension: umpy.core.multiarray failed to import" #1

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

Closed
wants to merge 1 commit into from

Conversation

davidread
Copy link
Owner

This occurred because lstrip is the wrong tool here:

e = 'cannot import name numpy.core.multiarray'
str(e).lstrip('cannot import name ')
'umpy.core.multiarray'

Better:

str(e).replace('cannot import name ', '')
'numpy.core.multiarray'

--

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master --name-only -- '*.py' | flake8 --diff
  • whatsnew entry

…ed to import"

This occurred because lstrip is the wrong tool here:

>>> e = 'cannot import name numpy.core.multiarray'
>>> str(e).lstrip('cannot import name ')
'umpy.core.multiarray'

Better:

>>> str(e).replace('cannot import name ', '')
'numpy.core.multiarray'
@davidread
Copy link
Owner Author

Closing PR in favour of pandas-dev#16366

@davidread davidread closed this Jun 7, 2017
@davidread davidread deleted the fix-stripped-chars-in-import-error branch June 7, 2017 10:56
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

Successfully merging this pull request may close these issues.

1 participant