Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG Solution] Img not found "An unexpected error occurred. Activate Alfred workflow debug mode for more information" #405

Closed
esseti opened this issue Jan 19, 2024 · 1 comment

Comments

@esseti
Copy link

esseti commented Jan 19, 2024

In the debug there's this:

[09:37:19.105] STDERR: Open Chrome Profile[Script Filter] Traceback (most recent call last):
  File "/Users/stefano/Documents/alfred/Alfred.alfredpreferences/workflows/user.workflow.F094128D-75E3-4588-952E-0198284BB1D1/main.py", line 31, in <module>
    urllib.request.urlretrieve(profil[str(item)]['last_downloaded_gaia_picture_url_with_size'], filename)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 239, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 501, in open
    req = Request(fullurl, data)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 320, in __init__
    self.full_url = url
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 346, in full_url
    self._parse()
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 375, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: ''

SOLUTION:

At this line:
https://github.com/alanhg/alfred-workflows/blob/62d2758d67c4fe9c0760a4050cf80cd29de4991f/open-chrome-profile/src/main.py#L32

change to
except (urllib.error.HTTPError, ValueError) as e:

@alanhe421
Copy link
Owner

@esseti
thank you , I have released the new version.

your code is right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants