mickaelperrin/bitwarden-decrypt-cli

module 'bitwarden_simple_cli.services' has no attribute 'ContainerService'

Closed this issue · 4 comments

  • This is on centos 7.6 using python36 with bitwarden bw tool installed sucessuflly.


[me@bw ~]$ bw unlock
? Master password: [hidden]
Your vault is now unlocked!

To unlock your vault, set your session key to the `BW_SESSION` environment variable. ex:
$ export BW_SESSION="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf2yth/1R3/yhgB+irDESoVS3Ior9rzHoJ2kUQejQ=="
> $env:BW_SESSION="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf2yth/1R3/yhgB+irDESoVS3Ior9rzHoJ2kUQejQ=="

You can also pass the session key to any command with the `--session` option. ex:
$ bw list items --session xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf2yth/1R3/yhgB+irDESoVS3Ior9rzHoJ2kUQejQ==
[me@bw ~]$
[me@bw ~]$ echo $BW_SESSION
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf2yth/1R3/yhgB+irDESoVS3Ior9rzHoJ2kUQejQ==
[me@bw ~]$ bw-simple get [FIELD=password]  c9d2fde3-b9c3-4cb5-a94d-aa4d015bb120
Traceback (most recent call last):
  File "/usr/local/bin/bw-simple", line 7, in <module>
    from bitwarden_simple_cli.__main__ import start
  File "/usr/local/lib/python3.6/site-packages/bitwarden_simple_cli/__init__.py", line 1, in <module>
    from .CliSimple import CliSimple
  File "/usr/local/lib/python3.6/site-packages/bitwarden_simple_cli/CliSimple.py", line 3, in <module>
    from bitwarden_simple_cli.Bitwarden import Bitwarden
  File "/usr/local/lib/python3.6/site-packages/bitwarden_simple_cli/Bitwarden.py", line 3, in <module>
    from bitwarden_simple_cli.services.ContainerService import ContainerService
  File "/usr/local/lib/python3.6/site-packages/bitwarden_simple_cli/services/ContainerService.py", line 1, in <module>
    import bitwarden_simple_cli.services.CryptoService as CryptoService
  File "/usr/local/lib/python3.6/site-packages/bitwarden_simple_cli/services/CryptoService.py", line 3, in <module>
    from bitwarden_simple_cli.models.domain.CipherString import CipherString
  File "/usr/local/lib/python3.6/site-packages/bitwarden_simple_cli/models/domain/CipherString.py", line 3, in <module>
    import bitwarden_simple_cli.services.ContainerService as ContainerService
AttributeError: module 'bitwarden_simple_cli.services' has no attribute 'ContainerService'
[me@bw ~]$

lxop commented

I'm also seeing this problem

lxop commented

It is caused by an import loop between ContainerService->CryptoService->CipherString->ContainerService

lxop commented

Aaaand it's only a problem with Python 3.6 (and below), which aren't supported (at least according to PyPI), so nothing to see here!
It might pay to be clearer about version requirements in the readme though.

Install python 3.8.1 on centos 7.7.

[me@pace05 ~]$ bw-simple get name 6dc941a4-xxx-4b28-9085-aab2014b7f4a;echo
rylg01t.test.com
[me@pace05 ~]$