carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
504 stars 54 forks source link

RuntimeError: Type not yet supported: pathlib.Path | None #126

Closed mitar closed 6 months ago

mitar commented 6 months ago

Desktop (please complete the following information):

Describe the bug

Digest: sha256:fa77d9e0a7b16b720e53eab06b3301246729381ad491a57760f5fb31d31501dc
Status: Downloaded newer image for carderne/sigexport:v1.8.2
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/bin/sigexport:8 in <module>                                       │
│                                                                              │
│   5 from sigexport.main import cli                                           │
│   6 if __name__ == '__main__':                                               │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])     │
│ ❱ 8 │   sys.exit(cli())                                                      │
│   9                                                                          │
│                                                                              │
│ ╭────────────────────────────── locals ───────────────────────────────╮      │
│ │ cli = <function cli at 0x7f2d12147e20>                              │      │
│ │  re = <module 're' from '/usr/local/lib/python3.12/re/__init__.py'> │      │
│ │ sys = <module 'sys' (built-in)>                                     │      │
│ ╰─────────────────────────────────────────────────────────────────────╯      │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/sigexport/main.py:512 in cli         │
│                                                                              │
│   509                                                                        │
│   510 def cli() -> None:                                                     │
│   511 │   """cli."""                                                         │
│ ❱ 512 │   run(main)                                                          │
│   513                                                                        │
│   514                                                                        │
│   515 if __name__ == "__main__":                                             │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:1056 in run            │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:328 in __call__        │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:311 in __call__        │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:364 in get_command     │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:577 in                 │
│ get_command_from_info                                                        │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:553 in                 │
│ get_params_convertors_ctx_param_name_from_function                           │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:850 in get_click_param │
│                                                                              │
│ /usr/local/lib/python3.12/site-packages/typer/main.py:779 in get_click_type  │
╰──────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Type not yet supported: pathlib.Path | None

To reproduce

I installed the latest version inside venv:

Successfully installed Markdown-3.6 beautifulsoup4-4.12.3 click-8.1.7 emoji-2.11.1 importlib-metadata-7.1.0 markdown-it-py-3.0.0 mdurl-0.1.2 pygments-2.18.0 rich-13.7.1 shellingham-1.5.4 signal-export-1.8.2 soupsieve-2.5 typer-0.12.3 typing-extensions-4.11.0 zipp-3.18.1

I run sigexport --paginate=0 --newlines /path/to/output.

carderne commented 6 months ago

signal-export requires Python >= 3.9.

If you're unable to install a newer version of Python, you can try an older versio of signal-export, but I can't provide any help if it doesn't work as you want: https://pypi.org/project/signal-export/1.8.2/

pip install signal-export==1.8.2
mitar commented 6 months ago

Oh, I didn't find anywhere documented what is the required version. Thanks.