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' object has no attribute 'img_b64_to_array' #9

Open
SiDinhThoi opened this issue Jul 25, 2018 · 6 comments
Open

Comments

@SiDinhThoi
Copy link

When I run python labelme2COCO.py, I have a following bug:
Traceback (most recent call last):
File "labelme2COCO.py", line 144, in
labelme2coco(labelme_json,'new.json')
File "labelme2COCO.py", line 31, in init
self.save_json()
File "labelme2COCO.py", line 136, in save_json
self.data_transfer()
File "labelme2COCO.py", line 37, in data_transfer
self.images.append(self.image(data,num))
File "labelme2COCO.py", line 49, in image
img = utils.img_b64_to_array(data['imageData'])

I don't know how to fix this error, help me

@ll884856
Copy link

ll884856 commented Aug 2, 2018

Have you solved this problem? I have the same problem. Thanks.

@SiDinhThoi
Copy link
Author

SiDinhThoi commented Aug 2, 2018

Hi,

My OS is Ubuntu 16.04 and I try to install labelme with Python2 and the error was fixed:

sudo apt-get install python-pyqt5 # PyQt5
sudo pip install labelme

Hope this will help you

@shaolei-wang
Copy link

On the code, it uses

from .image import img_arr_to_b64
from .image import img_b64_to_arr

So you need change img_b64_to_array to img_b64_to_arr

@hundundragonsoul
Copy link

On the code, it uses

from .image import img_arr_to_b64
from .image import img_b64_to_arr

So you need change img_b64_to_array to img_b64_to_arr

Thanks for your help!

@LIMU2
Copy link

LIMU2 commented May 21, 2019

On the code, it uses

from .image import img_arr_to_b64
from .image import img_b64_to_arr

So you need change img_b64_to_array to img_b64_to_arr

thx~ it's really helpful

@AbdullahJirjees
Copy link

@SiDinhThoi I have you same issue, I tried to code on Windows 11, and on Ubuntu, I got the same issue. Can you please help me with how did you solve the issue?
Thanks

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

6 participants