LandingEllipse / SLDTk

Repository for the Solar Limb Darkening Toolkit
MIT License
2 stars 1 forks source link

Something wrong due to SLDTK cannot be executed. #35

Open tamdywu opened 1 year ago

tamdywu commented 1 year ago

Hi, I am a beginner of python, and I'm also trying to use the tool. I get the following error:

sldtk -i 20170420_4096_HMIIC.jpg Traceback (most recent call last): File "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\Scripts\sldtk.exe__main.py", line 7, in File "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\lib\site-packages\sldtk\init__.py", line 5, in cli main() File "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\lib\site-packages\sldtk\sldtk.py", line 56, in main disk_attr = detection.detect_disk(gray, args['threshold']) File "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\lib\site-packages\sldtk\detection.py", line 44, in detect_disk img_mod, contours, hierarchy = cv2.findContours(mask, cv2.RETR_EXTERNAL, ValueError: not enough values to unpack (expected 3, got 2)

How can i solve the trouble? Thanks!

AxelRoVa commented 2 months ago

Hello, you should follow this path "C:\Users\bh1173\AppData\Local\Programs\Python\Python310\lib\site-packages\sldtk\detection.py" open "detection.py" and delete img_mod in the "img_mod, contours, hierarchy = cv2.findContours(mask, cv2.RETR_EXTERNAL,...." line.