You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Bitwarden export contained an identity that had a "URL" field (which probably carried over from a Dashlane import), causing the parser to raise
TypeError: string indices must be integers, not 'str'
❯ pass import -vvv ./bitwarden.json
. Trying to guess file format and manager name.
. Importer: bitwarden, Format: json, Version:
. Importing passwords from BitwardenJSON to PasswordStore
. Traceback (most recent call last):
File "/nix/store/nchhvpp6fax1m9p2dlrn5l3v4kxycafs-pass-import-3.2/lib/python3.11/site-packages/pass_import/__main__.py", line 342, in pass_import
importer.parse()
File "/nix/store/nchhvpp6fax1m9p2dlrn5l3v4kxycafs-pass-import-3.2/lib/python3.11/site-packages/pass_import/managers/bitwarden.py", line 98, in parse
entry['url'] = urls[0]['uri']
~~~~~~~^^^^^^^
TypeError: string indices must be integers, not 'str'
w string indices must be integers, not 'str'
[x] Error: ./bitwarden.json is not a valid exported bitwarden file.
The above is using pass-import 3.2 because that's the latest in NixOS, but you can reproduce it on 3.5 by git applying this diff (based on d12ad97) and running make tests:
Here's how `entry['url']` looks in PDB, using that diff
❯ git clone -q https://github.com/roddhjav/pass-import
❯ cat repro.py
from pass_import.managers.bitwarden import BitwardenJSON
with BitwardenJSON("/tmp/pass-import/tests/assets/db/bitwarden-other.json") as importer:
importer.parse()
❯ python -m pdb repro.py
> /tmp/repro.py(1)<module>()
-> from pass_import.managers.bitwarden import BitwardenJSON
(Pdb) c
Traceback (most recent call last):
File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/pdb.py", line 1732, in main
pdb._runscript(mainpyfile)
File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/pdb.py", line 1592, in _runscript
self.run(statement)
File "/nix/store/65cp4izx3bllnwqn7c7dhrq9h9gmjkal-python3-3.10.9/lib/python3.10/bdb.py", line 597, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/tmp/repro.py", line 4, in <module>
importer.parse()
File "/nix/store/ykw1k6lkcss99w44b54qaqh9xvkn4f6a-pass-import-3.2/lib/python3.10/site-packages/pass_import/managers/bitwarden.py", line 98, in parse
entry['url'] = urls[0]['uri']
TypeError: string indices must be integers
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /nix/store/ykw1k6lkcss99w44b54qaqh9xvkn4f6a-pass-import-3.2/lib/python3.10/site-packages/pass_import/managers/bitwarden.py(98)parse()
-> entry['url'] = urls[0]['uri']
(Pdb) entry
{'group': None, 'title': 'John DOE', 'url': 'https://www.example.com', 'title_': 'M.', 'firstName': 'John', 'middleName': 'Rober', 'lastName': 'DOE', 'address1': '6 Rose street', 'city': 'New York', 'email': 'john.doe@email.com'}
(Pdb) entry['url']
'https://www.example.com'
(Pdb) entry['url'][0]
'h'
The text was updated successfully, but these errors were encountered:
My Bitwarden export contained an identity that had a "URL" field (which probably carried over from a Dashlane import), causing the parser to raise
TypeError: string indices must be integers, not 'str'
The above is using pass-import 3.2 because that's the latest in NixOS, but you can reproduce it on 3.5 by
git apply
ing this diff (based on d12ad97) and runningmake tests
:Here's how `entry['url']` looks in PDB, using that diff
The text was updated successfully, but these errors were encountered: