giovannicoppola / alfred-convert

Convert between different units in Alfred
Other
56 stars 1 forks source link

ImportError: cannot import name 'six' from 'pkg_resources.extern #8

Closed allard closed 6 months ago

allard commented 6 months ago

Alfred 5.5 Mac OS: 14.4.1

Haven't tested the converter script for a while and noticed it wasn't working properly. When I'm doing a very simple test, I'm getting the following error:

[21:50:07.359] Convert[Script Filter] Queuing argument '1 kg g'
[21:50:07.477] Convert[Script Filter] Script with argv '1 kg g' finished
[21:50:07.485] ERROR: Convert[Script Filter] Code 1: .
http_proxy=
https_proxy=
Traceback (most recent call last):
  File "/Users/allard/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B4BE2773-3EA6-4638-ACA3-4BA82B272905/convert.py", line 19, in <module>
    from pint import UnitRegistry, UndefinedUnitError, DimensionalityError
  File "/Users/allard/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B4BE2773-3EA6-4638-ACA3-4BA82B272905/pint/__init__.py", line 17, in <module>
    import pkg_resources
  File "/Users/allard/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B4BE2773-3EA6-4638-ACA3-4BA82B272905/pkg_resources/__init__.py", line 57, in <module>
    from pkg_resources.extern import six
ImportError: cannot import name 'six' from 'pkg_resources.extern' (/Users/allard/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B4BE2773-3EA6-4638-ACA3-4BA82B272905/pkg_resources/extern/__init__.py)

Thanks for looking into this.

giovannicoppola commented 6 months ago

@allard please check https://github.com/giovannicoppola/alfred-convert/issues/6

allard commented 6 months ago

Indeed, that fixes it. Thank you. Maybe that should be the default? I have python installed as part of homebrew which then apparently caused this issue.

giovannicoppola commented 5 months ago

agreed, I pushed a release implementing that