MatthiasLienhard / flowkey_dl

helper to create sheet music from flowkey songs
MIT License
70 stars 15 forks source link

Error on save #18

Closed tilusnet closed 2 years ago

tilusnet commented 2 years ago
Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/xxx/opt/miniconda3/envs/experimental-py37/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/home/xxx/opt/miniconda3/envs/experimental-py37/lib/python3.7/site-packages/flowkey_dl/flowkey_dl_gui.py", line 165, in save
    strip_url(self.url.get()))+'.pdf'
TypeError: join() takes exactly one argument (3 given)

Btw, I also had to manually create /home/xxx/opt/miniconda3/envs/experimental-py37/lib/python3.7/site-packages/flowkey_dl/raw/ for the .png.

tilusnet commented 2 years ago

FYI - flowkey_dl was installed into a conda virtual env, in the usual way with pip install flowkey_dl.

tilusnet commented 2 years ago

this error happens in the GUI only; the CLI works.

PhilSnider commented 2 years ago

Thank you for trying to fix this. I still have an issue unfortunately: saving raw image of sheet - to /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flowkey_dl/raw/i9uwQL5KqTiug46ZC.png Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 1921, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flowkey_dl/flowkey_dl_gui.py", line 159, in save save_png(self.image, self.url.get(), File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flowkey_dl/flowkey_dl.py", line 190, in save_png Image.fromarray(image).save(filename, pnginfo=metadata) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PIL/Image.py", line 2317, in save fp = builtins.open(filename, "w+b") FileNotFoundError: [Errno 2] No such file or directory: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flowkey_dl/raw/i9uwQL5KqTiug46ZC.png'

cli works perfectly

MatthiasLienhard commented 2 years ago

The issue with raw images should not occur anymore with 0.1.4 - If the folder is not found, the raw image is not saved, but downloaded again next time the load button is hit.

PhilSnider commented 2 years ago

Thank you! Now it works