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

numpy error (pad_width must be of integral type.) when running on python3 #4

Closed
skorasaurus opened this issue Nov 2, 2019 · 2 comments

Comments

@skorasaurus
Copy link

I receive the following error when I ran fft-descreen for the first time using Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0] on linux; ubuntu 18.04

Traceback (most recent call last):
  File "descreen.py", line 36, in <module>
    middle = np.pad(ellipse(ew, eh), ((ph,rows-ph-eh*2-1), (pw,cols-pw-ew*2-1)), 'constant')
  File "<__array_function__ internals>", line 6, in pad
  File "/home/myusername/python/fft-descreen/.venv/lib/python3.6/site-packages/numpy/lib/arraypad.py", line 738, in pad
    raise TypeError('`pad_width` must be of integral type.')
TypeError: `pad_width` must be of integral type.

What I did:

  1. clone repository
  2. cd to fft-descreen, run mkdir .venv && virtualenv -p /usr/bin/python3 --no-site-packages .venv
  3. activate virtualenv (source .venv/bin/activate)
  4. pip install opencv-python (Successfully installed numpy-1.17.3 opencv-python-4.1.1.26).
  5. ran python3 descreen.py before.jpg after.jpg

I used fft-descreen successfully about 9-10 months on a separate installation of ubuntu (that was 16.04 and iirc, I used python2 then).

@skorasaurus
Copy link
Author

oops, this is a duplicate of #2

@6o6o
Copy link
Owner

6o6o commented Nov 2, 2019

Yes, this should be fixed with 8e26b19

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