Front page › Forums › General › Accounts (git etc.) › Token error
Tagged: token
This topic contains 6 replies, has 4 voices, and was last updated by SZEPilot 3 years, 5 months ago.
-
AuthorPosts
-
November 5, 2018 at 5:56 pm #29516
Hello,
I am trying to set my token using dts tok set <token> and ran into following error. Could you suggest me what should I do next?
TypeError: the JSON object must be str, not ‘bytes’
dts : Please report that you are using:
:
: duckietown-shell: 3.0.30
: duckietown-shell-commands: 1.0.15
: python: “3.5.2 (default, Nov 23 2017, 16:37:01) \n[GCC 5.4.0 20160609]”Thanks
November 8, 2018 at 3:31 pm #29617Can you post the full output?
November 9, 2018 at 3:17 am #29624I am setting up the preliminaries following this link http://docs.duckietown.org/DT18/AIDO/out/cm_sw.html
Hope this helps. I could not proceed without fixing token issue.~$dts version
INFO:dts:duckietown-shell 3.0.30
dts : Problems with a command?
:
: Report here: https://github.com/duckietown/duckietown-shell-commands/issues
:
: Troubleshooting:
:
: – If some commands update fail, delete ~/.dt-shell/commands
:
: – To reset the shell to “factory settings”, delete ~/.dt-shell
:
: (Note: you will have to re-configure.)
ERROR:dts:Traceback (most recent call last):
File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/cli.py”, line 171, in check_commands_outdated
data = json.loads(content)
File “/usr/lib/python3.5/json/__init__.py”, line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not ‘bytes’Duckietown Shell commands version 1.0.15
dts version 3.0.30~$ dts tok set
INFO:dts:duckietown-shell 3.0.30dts : Problems with a command?
:
: Report here: https://github.com/duckietown/duckietown-shell-commands/issues
:
: Troubleshooting:
:
: – If some commands update fail, delete ~/.dt-shell/commands
:
: – To reset the shell to “factory settings”, delete ~/.dt-shell
:
: (Note: you will have to re-configure.)
ERROR:dts:Traceback (most recent call last):
File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/cli.py”, line 171, in check_commands_outdated
data = json.loads(content)
File “/usr/lib/python3.5/json/__init__.py”, line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not ‘bytes’Duckietown Shell commands version 1.0.15
dts : args: []
Please enter your Duckietown token.
It looks something like this:
dt1-7vEuJsaxeXXXXX-43dzqWFnWd8KBa1yev1g3UKnzVxZkkTbfSJnxzuJjWaANeMf4y6XSXBWTpJ7vWXXXX
To find your token, first login to duckietown.org, and open the page:
Enter token: ****(correct token)
dts : Traceback (most recent call last):
: File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/__init__.py”, line 38, in cli_main
: cli_main_()
: File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/__init__.py”, line 106, in cli_main_
: shell.onecmd(cmdline)
: File “/usr/lib/python3.5/cmd.py”, line 217, in onecmd
: return func(arg)
: File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/cli.py”, line 409, in <lambda>
: do_command_lam = lambda s, w: do_command(klass, s, w)
: File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/dt_command_abs.py”, line 41, in do_command
: cls.commands[word].do_command(cls.commands[word], shell, ‘ ‘.join(parts[1:]))
: File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/dt_command_abs.py”, line 52, in do_command
: cls.command(shell, args)
: File “/home/ksivasan/.dt-shell/commands/tok/set/command.py”, line 45, in command
: uid = get_id_from_token(s)
: File “/home/ksivasan/.local/lib/python3.5/site-packages/dt_shell/duckietown_tokens.py”, line 94, in get_id_from_token
: data = json.loads(token.payload)
: File “/usr/lib/python3.5/json/__init__.py”, line 312, in loads
: s.__class__.__name__))
: TypeError: the JSON object must be str, not ‘bytes’dts : Please report that you are using:
:
: duckietown-shell: 3.0.30
: duckietown-shell-commands: 1.0.15
: python: “3.5.2 (default, Nov 23 2017, 16:37:01) \n[GCC 5.4.0 20160609]”-
This reply was modified 3 years, 6 months ago by
ksivasan.
November 9, 2018 at 9:33 pm #29630This will be fixed in the Duckietown Shell v3.0.31, wait for it to be released, it should be online tomorrow.
November 11, 2018 at 2:48 am #29874Thanks, I will wait for the release.
November 26, 2018 at 11:48 am #30514still having this issue in 3.0.31, can you please help?
November 26, 2018 at 12:09 pm #30515fixed, but always install with pip2 e.g. pip2 install –user –no-cache-dir -U duckietown-shell
-
This reply was modified 3 years, 6 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.