Giter Site home page Giter Site logo

Python 3 support about alfred-vpn-manager HOT 4 OPEN

deanishe avatar deanishe commented on July 23, 2024 6
Python 3 support

from alfred-vpn-manager.

Comments (4)

rombarcz avatar rombarcz commented on July 23, 2024 1

Workaround for now is:

  1. install Python 2.7.18 from Python.org: https://www.python.org/downloads/release/python-2718/
  2. update all scripts with /usr/local/bin/python2

from alfred-vpn-manager.

blaircraft avatar blaircraft commented on July 23, 2024 1

You also need to update the location of Python at line 208 of background.py. You can find the location of background.py by turning on debugging in the workflow, attempting to use it, and examining the output for the actual path.

Change:
cmd = ['/usr/bin/python', __file__, name]
to:
cmd = ['/usr/local/bin/python2', __file__, name]

(... or whatever your path to the Python 2.7 interpreter).

from alfred-vpn-manager.

romancin avatar romancin commented on July 23, 2024

For the moment, I have followed this steps from Alfred:

https://www.alfredapp.com/help/kb/python-2-monterey/

from alfred-vpn-manager.

bendschs avatar bendschs commented on July 23, 2024

could it be that this stopped working for the most recent visosity 1.9.1 ?

installed python 2.7 like suggested by @romancin/alfred, updated all the path‘s including the one in background.py. the workflow seems to read the stored vpn-connections correctly but connecting or disconnecting is not possible (fails without specific error).

20:47:38 vpn.py:123 DEBUG    [Viscosity] appinfo=AppInfo(name=u'Viscosity', path=u'/Applications/3 Internet/Viscosity.app', bundleid=u'com.viscosityvpn.Viscosity')
20:47:38 vpn.py:85 DEBUG    [0.17s] fetched Viscosity VPN connections
20:47:38 workflow.py:1730 DEBUG    cached data: /Users/Benno/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.vpn.manager/_wfsess-3d35cf897280443abab114ec35362a96-viscosity-connections.cpickle
20:47:38 workflow.py:1695 DEBUG    loading cached data: /Users/Benno/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.vpn.manager/__workflow_latest_version.cpickle
20:47:38 workflow.py:2254 DEBUG    set last run version: 3.2.0
20:47:38 workflow.py:2103 DEBUG    ---------- finished in 0.540s ----------
[20:47:43.427] STDERR: VPN Manager[[Run Script](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.C7539D03-C2A6-4DE4-9689-2AC623FE4D39%3E3320B185-EABE-4399-98AB-D93EFA238B86)] .
20:47:42 workflow.py:2061 DEBUG    ---------- VPN Manager (3.2.0) ----------
20:47:42 workflow.py:1468 DEBUG    reading settings from /Users/Benno/Library/Application Support/Alfred/Workflow Data/net.deanishe.alfred.vpn.manager/settings.json
20:47:42 workflow.py:2338 INFO     checking for update ...
20:47:42 background.py:233 DEBUG    [__workflow_update_check] command cached: /Users/Benno/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.vpn.manager/__workflow_update_check.argcache
20:47:42 background.py:237 DEBUG    [__workflow_update_check] passing job to background runner: [u'/opt/homebrew/bin/python', '/Users/Benno/Nextcloud/00 Admin/00 Config/B2ARCH/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C7539D03-C2A6-4DE4-9689-2AC623FE4D39/workflow/background.pyc', u'__workflow_update_check']
.
20:47:43 workflow.py:2061 DEBUG    ---------- VPN Manager (3.2.0) ----------
20:47:43 background.py:243 DEBUG    [__workflow_update_check] background job started
20:47:43 vpn.py:515 DEBUG    args : {'--all': False,
 '--help': False,
 '<name>': u'ba2nas',
 '<query>': None,
 'app': False,
 'conf': False,
 'connect': False,
 'disconnect': True,
 'list': False}
20:47:43 vpn.py:123 DEBUG    [Viscosity] appinfo=AppInfo(name=u'Viscosity', path=u'/Applications/3 Internet/Viscosity.app', bundleid=u'com.viscosityvpn.Viscosity')
20:47:43 workflow.py:1695 DEBUG    loading cached data: /Users/Benno/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/net.deanishe.alfred.vpn.manager/_wfsess-3d35cf897280443abab114ec35362a96-viscosity-connections.cpickle
20:47:43 vpn.py:154 INFO     disconnecting "ba2nas" ...
20:47:43 workflow.py:2254 DEBUG    set last run version: 3.2.0
20:47:43 workflow.py:2103 DEBUG    ---------- finished in 0.466s --------

from alfred-vpn-manager.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.