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 'stone' has no attribute 'process' #15

Closed
ergo70 opened this issue Jan 16, 2024 · 6 comments
Closed

AttributeError: module 'stone' has no attribute 'process' #15

ergo70 opened this issue Jan 16, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ergo70
Copy link

ergo70 commented Jan 16, 2024

The command line Version works, but:

I followed the instructions for using the library.

pip install skin-tone-classifier --upgrade

import stone

result = stone.process('xxx.jpg', image_type='color')

But then:

AttributeError: module 'stone' has no attribute 'process'

Python 3.10.11

@ergo70 ergo70 added the bug Something isn't working label Jan 16, 2024
@ergo70 ergo70 changed the title [🐛 BUG] Please describe the bug briefly. AttributeError: module 'stone' has no attribute 'process' Jan 16, 2024
@ChenglongMa
Copy link
Owner

Hi @ergo70,

Thanks for your feedback.

I tried on my side and in a Google Colab session, but it works well.

Can you give me more details to reproduce this problem?
You can also check the Colab example here: Google Colab. It is a running example, so that you can see more intuitively how to use this library.

Thanks!

@ergo70
Copy link
Author

ergo70 commented Jan 17, 2024

I tried with your minimal example:

pip uninstall skin-tone-classifier
pip install skin-tone-classifier

skin-tone-classifier Version is 1.1.2

import stone

image_path = "https://raw.githubusercontent.com/ChenglongMa/SkinToneClassifier/main/docs/demo.png" # Use the demo.png stored in my repo

result = stone.process(image_path, image_type="color", return_report_image=False)

Traceback (most recent call last):
File "c:\Devel\SkinToneAPI\stonetest.py", line 5, in
result = stone.process(image_path, image_type="color", return_report_image=True)
AttributeError: module 'stone' has no attribute 'process'

Maybe because I try it on Windows 11?

@ergo70
Copy link
Author

ergo70 commented Jan 17, 2024

I now tried it on WSL2 Ubuntu 22.04.3 LTS / Python 3.10.12 and it works without problems.

As said, the stone.exe Script also works on Windows. The error occurs only when I try the library in code.

@ChenglongMa
Copy link
Owner

Hi @ergo70,

Are you using Anaconda, Miniconda, or pure Python?
I have no Win 11 devices, but I will try creating another sandbox environment to reproduce the problem.

BTW, are there other folders or modules in your project named stone?

Thanks!

@ergo70
Copy link
Author

ergo70 commented Jan 17, 2024

Obviously, I had a stone.py leftover from earlier tests. Now it works... ;-\

Sorry for tripping over this.

@ergo70 ergo70 closed this as completed Jan 17, 2024
@ChenglongMa
Copy link
Owner

Hi @ergo70,

I'm glad your problem was solved.

Have a nice day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants