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

'NoneType' object has no attribute 'seek' #27

Open
zmrcic opened this issue Jun 30, 2023 · 3 comments
Open

'NoneType' object has no attribute 'seek' #27

zmrcic opened this issue Jun 30, 2023 · 3 comments

Comments

@zmrcic
Copy link

zmrcic commented Jun 30, 2023

I have checked all requirements and they are OK...
I think it's java but not sure....

on line
detector.detect(image)
from examples I get
Exception has occurred: AttributeError
'NoneType' object has no attribute 'seek'.

thank you...

@lessthanoptimal
Copy link
Owner

how did you load the image? Also are you sure the image path was correct? There's a chance "image" might be None

@zmrcic
Copy link
Author

zmrcic commented Jul 3, 2023

I'm using an absolute path like this. it is working in other py projects

detector = pb.FactoryFiducial(np.uint8).qrcode()
image = pb.load_single_band('F://WORK//B4AQR//viber_image_2_2.jpg', np.uint8)

@EdjeElectronics
Copy link

EdjeElectronics commented Nov 28, 2023

This can be fixed by modifying the __init__.py file in the <python_environment_location>/site-packages/pyboof folder. On line 160, change mmap_file to pbg.mmap_file like so:

pbg.mmap_file = mmap.mmap(pbg.mmap_fid.fileno(), length=0)

I created PR #28 to resolve this bug.

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

3 participants