scholer / actionista-todoist

CLI tool to manage your Todoist tasks from the command line, using powerful filters to select, print, reschedule, and complete tasks in a batch-wise fashion.
GNU General Public License v3.0
12 stars 4 forks source link

error during config (api key setup) #1

Open carpii opened 4 years ago

carpii commented 4 years ago

Any idea what could be causing this please?

Running python 3.7 on OSX Mojave (10.14.6), with pipx installed via homebrew

API key obviously blanked out, but Im using the real one from Todoist Integrations

Thanks

[carpii@flake:~]$ pipx install actionista-todoist
'actionista-todoist' already seems to be installed. Not modifying existing installation in '/Users/carpii/.local/pipx/venvs/actionista-todoist'. Pass '--force' to force installation.

[carpii@flake:~]$ pipx ensurepath
The directory `/Users/carpii/.local/bin` is already in PATH
If you are sure you want to proceed, try again with the '--force' flag.
Otherwise pipx is ready to go!

[carpii@flake:~]$ actionista-todoist-config

Setup is configuring your API login token. The API token is a small string of numbers and
letters, and is used in place of a password for authenticating with the Todoist servers.

You can find your personal API token by selecting 'Settings' -> 'Integrations' from
the Todoist web app, or going to: https://todoist.com/prefs/integrations

 - Using login token file: ~/.todoist_token.txt

 - Current token is: None

Please enter new token (enter blank or 'Ctrl+C' to abort):  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 - Updating token file ~/.todoist_token.txt with new token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/Users/carpii/.local/bin/actionista-todoist-config", line 8, in <module>
    sys.exit(todoist_config_cli())
  File "/Users/carpii/.local/pipx/venvs/actionista-todoist/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/carpii/.local/pipx/venvs/actionista-todoist/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/carpii/.local/pipx/venvs/actionista-todoist/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/carpii/.local/pipx/venvs/actionista-todoist/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/carpii/.local/pipx/venvs/actionista-todoist/lib/python3.7/site-packages/actionista/todoist/config_cli.py", line 36, in todoist_config_cli
    token = store_token(new_token=token)
  File "/Users/carpii/.local/pipx/venvs/actionista-todoist/lib/python3.7/site-packages/actionista/todoist/config.py", line 152, in store_token
    config['token'] = new_token
TypeError: 'NoneType' object does not support item assignment
sanmiguel commented 4 years ago

I had this exact same problem - got past it by manually creating the ~/.todoist_token.txt with my token in.

jeremymeyers commented 3 years ago

Just a note to say that this is still happening (in Win10, anyway)