jleclanche / python-bna

Python implementation of the mobile Blizzard Authenticator (TOTP)
https://eu.battle.net/support/en/article/24520
MIT License
250 stars 38 forks source link

TypeError: option values must be strings #20

Closed theAkito closed 5 years ago

theAkito commented 5 years ago
python3 bna new
Traceback (most recent call last):
  File "bna", line 281, in <module>
    main()
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "bna", line 189, in new
    ctx.obj.add_serial(serial, secret, set_default=set_default)
  File "bna", line 89, in add_serial
    self.set_secret(serial, secret)
  File "bna", line 136, in set_secret
    self.config.set(serial, "secret", secret)
  File "/usr/lib/python3.7/configparser.py", line 1197, in set
    self._validate_value_types(option=option, value=value)
  File "/usr/lib/python3.7/configparser.py", line 1182, in _validate_value_types
    raise TypeError("option values must be strings")
TypeError: option values must be strings
jleclanche commented 5 years ago

What are you running? I see you have a bna file locally but that seems like a mismatch.

If you want to run the version from git, clone it locally and do pip install -e . in the bna directory, preferably in a virtualenv.

orangelynx commented 5 years ago

possibly related to running it with py3.7 instead of py3.6