algolia / algolia/color-extractor

Error in image_to_color.py while using as library: Line 36

Open
#9 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
284
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Hey Thanks for the fabulous work!

I tried and CLI is working perfectly fine. However, when tried as library in a python file, giving this error:

Traceback (most recent call last):
File "test.py", line 10, in
print(img_to_color.get(img))
File "/home/color-extractor-master/color_extractor/image_to_color.py", line 36, in get
if self._settings['debug'] is None:
KeyError: 'debug'

Non CS background so might overlook something, please help!
Thanks in advance.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at color_extractor/image_to_color.py line 36 and compare how settings are initialized for CLI use versus library use. Confirm the library example in test.py no longer raises KeyError for the missing debug setting and preserves the existing CLI behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.