BenjaminOddou / alfred-plex

📺 Browse and perform actions on your plex media servers
https://alfred.app/workflows/benjaminoddou/plex/
MIT License
22 stars 0 forks source link

Unable to add Plex Account #7

Closed hoium closed 1 year ago

hoium commented 1 year ago

I receive the following error message when trying to add my Plex account.

[08:09:16.154] ERROR: Plex[Run Script] Traceback (most recent call last):
  File "$PATH/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C65CE066-1457-41AF-8621-2EE9ED12669A/servers_add_delete.py", line 8, in <module>
    _type, _origin, _input = sys.argv[1].split(';')
    ^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 1)
BenjaminOddou commented 1 year ago

Hey @hoium sorry about that ! Are you connected to your plex account but not the server ? I'll investigate on my side as well.

hoium commented 1 year ago

👋 @BenjaminOddou

I was connected to my server from the prior release and tried connecting my account. I removed the server, tried adding it back, and ran into that issue.

I removed the Workflow Data and reinstalled the workflow but I'm still running into that exception.

BenjaminOddou commented 1 year ago

@hoium Could you confirm me that you are connected to your account after you enter your credentials ? Under plex account section you should be able to see your account name

Edit: under the workflow data folder you should have an account.json

hoium commented 1 year ago

@BenjaminOddou, it fails to add the account. 2023-09-20_14-12-00

Looking at ~/Library/Application\ Support/Alfred/Workflow\ Data/com.benjamino.plex/ I'm only seeing a servers.json file.

cat servers.json
{
    "items": []
}
hoium commented 1 year ago
[14:16:57.311] Plex[Script Filter] Queuing argument '(null)'
[14:16:57.331] Plex[Script Filter] Script with argv '(null)' finished
[14:16:57.337] Plex[Script Filter] {"items": [
    {
        "title": "Plex Search",
        "subtitle": "Search medias throughout your servers",
        "arg": "_rerunSearch",
        "icon": {
            "path": "icons/base/folder.webp"
        }
    },
    {
        "title": "Plex Discover",
        "subtitle": "Search medias using discover",
        "arg": "_rerunDiscover",
        "icon": {
            "path": "icons/base/discover.webp"
        }
    },
    {
        "title": "Plex Accounts",
        "subtitle": "Manage your plex accounts",
        "arg": "_rerunAccounts",
        "icon": {
            "path": "icons/base/people.webp"
        }
    },
    {
        "title": "Plex Media Servers",
        "subtitle": "Manage servers and perform actions",
        "arg": "_rerunServers",
        "icon": {
            "path": "icons/base/servers.webp"
        }
    },
    {
        "title": "Plex Presets",
        "subtitle": "Manage presets to rapidly search medias",
        "arg": "_rerunPresets",
        "icon": {
            "path": "icons/base/preset.webp"
        }
    },
    {
        "title": "Plex Help",
        "subtitle": "Workflow configuration + filter & sort options",
        "arg": "_rerunHelp",
        "icon": {
            "path": "icons/base/help.webp"
        }
    }
]}
[14:16:58.159] Plex[Script Filter] Processing complete
[14:16:58.163] Plex[Script Filter] Passing output '_rerunAccounts' to Conditional
[14:16:58.165] Plex[Conditional] Processing complete
[14:16:58.166] Plex[Conditional] Passing output '_rerunAccounts' to Call External Trigger
[14:16:58.167] Plex[External] Processing complete
[14:16:58.168] Plex[External] Passing output '' to Arg and Vars
[14:16:58.170] Plex[Arg and Vars] Processing complete
[14:16:58.171] Plex[Arg and Vars] Passing output '' to Script Filter
[14:16:58.174] Plex[Script Filter] Queuing argument '(null)'
[14:16:58.357] Plex[Script Filter] Script with argv '(null)' finished
[14:16:58.363] Plex[Script Filter] {"items": [{"title": "Return", "subtitle": "Back to the Menu", "arg": "_rerunMenu", "icon": {"path": "icons/base/return.webp"}}, {"title": "Connect a new plex account", "subtitle": "Add a plex account and the connected plex media servers", "arg": "_new", "icon": {"path": "icons/base/new.webp"}}]}
[14:16:59.195] Plex[Script Filter] Processing complete
[14:16:59.201] Plex[Script Filter] Passing output '_new' to Split Arg
[14:16:59.203] Plex[Split Arg] Processing complete
[14:16:59.204] Plex[Split Arg] Passing output '_new' to Conditional
[14:16:59.205] Plex[Conditional] Processing complete
[14:16:59.207] Plex[Conditional] Keyword modified incoming arg from '_new' to ''
[14:16:59.207] Plex[Conditional] Passing output '' to Keyword
[14:17:05.157] Plex[Keyword] Processing complete
[14:17:05.163] Plex[Keyword] Passing output 'hoium' to Arg and Vars
[14:17:05.165] Plex[Arg and Vars] Processing complete
[14:17:05.166] Plex[Arg and Vars] Passing output '' to Keyword
[14:17:06.380] Plex[Keyword] Processing complete
[14:17:06.394] Plex[Keyword] Passing output '$PASSWORD' to Arg and Vars
[14:17:06.396] Plex[Arg and Vars] Processing complete
[14:17:06.397] Plex[Arg and Vars] Passing output '' to Keyword
[14:17:10.909] Plex[Keyword] Processing complete
[14:17:10.910] Plex[Keyword] Passing output '$OTP' to Arg and Vars
[14:17:10.911] Plex[Arg and Vars] Processing complete
[14:17:10.912] Plex[Arg and Vars] Passing output '_new;account;hoiumǀ$PASSWORDǀ' to Run Script
[14:17:12.500] Plex[Run Script] Processing complete
[14:17:12.506] Plex[Run Script] Passing output '' to Run Script
[14:17:12.617] ERROR: Plex[Run Script] Traceback (most recent call last):
  File "/Users/hoium/Library/CloudStorage/Dropbox/Backups/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C65CE066-1457-41AF-8621-2EE9ED12669A/servers_add_delete.py", line 8, in <module>
    _type, _origin, _input = sys.argv[1].split(';')
    ^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 1)
BenjaminOddou commented 1 year ago

Hey @hoium, it should be fixed with v2.0.2. Don't hesitate to give me feedbacks. Please reset your Data folder.

hoium commented 1 year ago

v2.0.2 fixed it! Thanks @BenjaminOddou!!