EmojiTaco icon indicating copy to clipboard operation
EmojiTaco copied to clipboard

Missing thumbnails

Open JesusTheHun opened this issue 2 years ago • 20 comments

The init process show Starting background process and then Complete. The img directory is empty.

Trying again didn't solve the issue. I deleted the workflow directory, installed again, didn't solve the issue (I had installed an outdated version at first so I thought it was worth a shot).

The files unicode.html and skin-tones.html are empty - zero byte.

Alfred 5
MacOS 12.5
Python 3.9.13

JesusTheHun avatar Aug 15 '22 13:08 JesusTheHun

Well Jesus the Hun...

Any chance you can post in the debug logs?

jeeftor avatar Aug 15 '22 14:08 jeeftor

I did not include it because there is nothing valuable 😔

15:05:07 downloadDataFiles.py:126 INFO     Emoji Init Started
15:05:08 background.py:285 ERROR    [emoji_init] command failed with status 1
15:05:08 downloadDataFiles.py:126 INFO     Emoji Init Started
15:34:35 downloadDataFiles.py:126 INFO     Emoji Init Started
15:34:35 background.py:285 ERROR    [emoji_init] command failed with status 1
15:34:36 downloadDataFiles.py:126 INFO     Emoji Init Started
15:47:14 downloadDataFiles.py:126 INFO     Emoji Init Started
15:47:14 background.py:285 ERROR    [emoji_init] command failed with status 1
15:47:15 downloadDataFiles.py:126 INFO     Emoji Init Started
15:47:22 downloadDataFiles.py:126 INFO     Emoji Init Started
15:47:22 background.py:285 ERROR    [emoji_init] command failed with status 1
15:47:22 downloadDataFiles.py:126 INFO     Emoji Init Started
17:21:22 workflow.py:2391 INFO     checking for update ...
17:21:22 background.py:285 ERROR    [__workflow_update_check] command failed with status 1
17:21:32 workflow.py:2391 INFO     checking for update ...
17:21:32 background.py:285 ERROR    [__workflow_update_check] command failed with status 1

JesusTheHun avatar Aug 15 '22 15:08 JesusTheHun

Yea... not so useful... the only question I guess I'd have is if you can run this from the command line directly? (if you know how to do that)

jeeftor avatar Aug 18 '22 14:08 jeeftor

I'm not a python guy but I used IntelliJ to run the main of bg_downloader.py. There are undeclared dependencies like Workflow3. I installed it but it says it's compatibly with Alfred 3, not 4 & 5. Unfortunately it imports cPickle which is not available at the runtime and isn't available via pip either. At this point I gave up.

Also, pickle isn't available with python 3.9 because it's bundled (so I skipped it).

JesusTheHun avatar Aug 18 '22 15:08 JesusTheHun

So cPickle existed only in Python2 and then it went away..

Are you using Py3 or Py2?

jeeftor avatar Aug 18 '22 15:08 jeeftor

And are you running this build: https://github.com/jeeftor/EmojiTaco/releases/tag/v2.0.1

jeeftor avatar Aug 18 '22 15:08 jeeftor

I used python3.9because version 2.0.2 says "python 3"

JesusTheHun avatar Aug 18 '22 16:08 JesusTheHun

image

Open in a terminal then run this command:

~PYTHONPATH=$(pwd)/src/libs python3 src/downloadDataFiles.py~

I mean this:

PYTHONPATH=$(pwd)/src/libs python3 src/bg_downloader.py

jeeftor avatar Aug 18 '22 16:08 jeeftor

image

If it works you'll see something like this...

jeeftor avatar Aug 18 '22 16:08 jeeftor

The PYTHONPATH command tells it where to look for local libs

jeeftor avatar Aug 18 '22 16:08 jeeftor

It downloads fine and then this happens :

10:26:37 bg_downloader.py:47 INFO     Parsing Downloaded Files
10:26:37 bg_downloader.py:48 INFO     Creating DataFileBuilder
/Users/jonathan/Library/Application Support/Alfred 2/Workflow Data/org.jeef.emoji/aw-m_iwlrsv/Icon.iconset:Failed to generate ICNS.
10:26:38 workflow.py:2111 ERROR    iconset exited with 1
Traceback (most recent call last):
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/libs/workflow/workflow.py", line 2104, in run
    func(self)
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/bg_downloader.py", line 40, in main
    parseFiles()
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/bg_downloader.py", line 54, in parseFiles
    parse_html_file(csv, "full-emoji-list.html", msg)
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/bg_downloader.py", line 160, in parse_html_file
    notify(title="Emoji Taco", text=message, sound=None)
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/libs/workflow/notify.py", line 196, in notify
    install_notifier()
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/libs/workflow/notify.py", line 128, in install_notifier
    png_to_icns(workflow_icon, icon)
  File "/Users/jonathan/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.4F081B84-2453-4B0F-9EAA-D7841578965A/src/libs/workflow/notify.py", line 282, in png_to_icns
    raise RuntimeError("iconset exited with %d" % retcode)
RuntimeError: iconset exited with 1

JesusTheHun avatar Aug 19 '22 08:08 JesusTheHun

Wow... that's so almost helpful... :( ... I'll have to look into the code and see what's going on but at least its downloading

So here is what its supposed to look like... image

And your stuff is crashing somewhere in here:

image

jeeftor avatar Aug 19 '22 15:08 jeeftor

Just for kicks can you try to re-init the emoji from Alfred?

jeeftor avatar Aug 19 '22 15:08 jeeftor

Same issue as JesusTheHun

MacOS 12.3 Alfred 4.7 Python 3.10.4 Screen Shot 2022-08-22 at 4 12 19 PM

abbaszpro avatar Aug 22 '22 11:08 abbaszpro

Actually as I look at that last one I wonder if it’s an issue with the notify module….

Which I could prob wrap in an exception….

I’ll try to get a release out today to test

Sent from my iPhone

On Aug 22, 2022, at 5:11 AM, AZ @.***> wrote:

 Same issue as JesusTheHun

MacOS 12.3 Alfred 4.7 Python 3.10.4

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

jeeftor avatar Aug 22 '22 11:08 jeeftor

After I ran in the terminal like you asked, and tried to init again from Alfred, now it says no "No emoji found". So weird just got weirder.

JesusTheHun avatar Aug 22 '22 12:08 JesusTheHun

I ran the bg_downloader.py script from Intellij, this time adding the libs to the PYTHONPATH. It failed because the working dir was src and therefore it did not find the img directory. So I changed the working dir and then it ran fine. Both use the same version, python 3.9.13.

I ran init again from Alfred, it failed as before. So it looks like it has nothing to do with your script per se, but indeed the notifier trying to create an icon for its notifications.

The convert_image function do not fail but it doesn't create the images either. I opened the iconset dir and the icons are not created, maybe that's why iconutil fails. I executed the same sips command directly in my terminal and it created the icon.

I removed the shell=True from src/libs/workflow/notify.py:231 and it works fine. It doesn't work when I try from Alfred though, so I'm not sure I understand what's going on.

JesusTheHun avatar Aug 22 '22 16:08 JesusTheHun

That isn't my code so I'm not 100% sure what's going on with the notify stuff.... Thanks for working on this ... I'm busy this week but can pick it up next week hopefully.

jeeftor avatar Aug 25 '22 15:08 jeeftor

For the time being here is my /img directory if you want icons for now. img.zip

jeeftor avatar Aug 25 '22 15:08 jeeftor

Hey all, giving Alfred notification allowance on my Mac fixed the missing thumbnails for me.

kelicia avatar May 12 '23 16:05 kelicia