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

update.py check throws an exception; process left hanging #116

Closed
rhydlewis opened this issue Apr 28, 2017 · 3 comments
Closed

update.py check throws an exception; process left hanging #116

rhydlewis opened this issue Apr 28, 2017 · 3 comments

Comments

@rhydlewis
Copy link

Not sure if this is an issue specific to my laptop, my workflow or something else but... I've noticed that the workflow/update.py script runs and then stays active using up CPU % (example of the 2 processes below).

I'm using alfred-workflow v1.2.1.

  1. Tue10pm 939:05.13 /usr/bin/python <path-to-workflow>/workflow/update.py check rhydlewis/search-omnifocus 1.2.3
  2. Tue10pm 0:00.00 /usr/bin/python <path-to-workflow>/workflow/background.pyc __workflow_update_check

When I try to run 1. outside of Alfred , I get this error:

/usr/bin/python <path-to-workflow>/workflow/update.py check rhydlewis/search-omnifocus 1.2.3 Traceback (most recent call last):
File "<path-to-workflow>/workflow/update.py", line 426, in <module>
check_update(github_slug, version, prereleases)
File "<path-to-workflow>/workflow/update.py", line 350, in check_update
releases = get_valid_releases(github_slug, prereleases)
File "<path-to-workflow>/workflow/update.py", line 322, in get_valid_releases
release = _validate_release(release)
File "<path-to-workflow>/workflow/update.py", line 238, in _validate_release
alf3 = wf().alfred_version.major == 3
File "<path-to-workflow>/workflow/workflow.py", line 1134, in alfred_version
return Version(self.alfred_env.get('version'))
File "<path-to-workflow>/workflow/update.py", line 89, in __init__
self._parse(vstr)
File "<path-to-workflow>/workflow/update.py", line 92, in _parse
if vstr.startswith('v'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Running the same script with 'v1.2.3' has the same result.

Any idea what might be causing this? Probably something simple on my end but I've no clue what...

Thanks

@deanishe
Copy link
Owner

The hanging is most likely #111

Update fails when run from the terminal because alfred_version isn't set in the environment (as it is when run from Alfred).

update.py needs Alfred's version, so it knows whether to grab or ignore .alfred3workflow files from releases.

@deanishe
Copy link
Owner

Also, you should run this workflow:

https://github.com/deanishe/alfred-fixum

If you're on 10.12.4, other workflows are probably subject to the same issue. That workflow should fix any other affected workflows.

@rhydlewis
Copy link
Author

That's great - much appreciated

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

No branches or pull requests

2 participants