jeticg / Evangelion-Uebersicht-Widget

Evangelion Style Übersicht Widget.
MIT License
74 stars 23 forks source link

iTunes.scpt cannot write to album.jpg #20

Closed zoenglinghou closed 6 years ago

zoenglinghou commented 6 years ago

iTunes display doesn't seem to work in the widget. When I run the code block in script editor without try-catch, it returns:

error "iTunes got an error: File file Macintosh HD:Users:CarlosZhang:Library:Application Support:Übersicht:widgets:Eva.widget:album.jpg is already open."
number -49 from file "Macintosh HD:Users:CarlosZhang:Library:Application Support:Übersicht:widgets:Eva.widget:album.jpg" to «class fsrf»

Is there some permission issues happening here? My understanding is Apple Script fails to close the access?

jeticg commented 6 years ago

Could you please check the permission setting of album.jpg?

zoenglinghou commented 6 years ago
ls -ahol album.jpg

gives

-rw-r--r--@ 1 CarlosZhang     0B Nov 11 18:40 album.jpg

After I executed

chmod u+rw album.jpg

the widget works correctly. The problem is fixed, but I still don't know what caused it. I did not see any permission changes:

-rw-r--r--@ 1 CarlosZhang   116K Nov 12 23:19 album.jpg

My apology, I am not an expert dealing with permissions.

jeticg commented 6 years ago

I am guessing probably the file was not closed properly the last time it was opened, as can be seen the file size was 0B. Not sure what caused it though, I personally have never encountered this problem.

zoenglinghou commented 6 years ago

That’s the most peculiar… because I deleted the file multiple times (while Übersicht was not running), and it didn’t fix the problem.

jeticg commented 6 years ago

but is it fine now?

zoenglinghou commented 6 years ago

Yes, and I am really grateful for your help ❤️