carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
436 stars 46 forks source link

sig export not recognised #90

Closed limanaid closed 1 year ago

limanaid commented 1 year ago

Hey - total novice here, but i can blindly feel my way through most steps easily enough.

I've followed the guide all the way to installing signal-exporter. Installed docker, installed pip. I run" pip install signal-export" in a powershell window and all looks well. subsequent runs show "requirement already satisfied".

However, when i try run "sigexport ~/signal-chats", the response is: sigexport : The term 'sigexport' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

I think all steps have been followed correctly up until this point. "docker run hello-world" returns a successful message.

Any help would be amazing thank you.

carderne commented 1 year ago

Semi-deuplicate of #89.

See if this works:

python -m sigexport.main --help
limanaid commented 1 year ago

That command seems to have worked. I changed the inital command to "python -m sigexport.main ~/signal-chats" and it seems to be working. Thank you so much!

limanaid commented 1 year ago

While i have you here, are you able to help my write a command to make it so i can make it export each chat as one html page? I.e How do i utilize the Paginate function? how do i write the command?

carderne commented 1 year ago

Great!

The second example here shows how to disable pagination.

dmct10 commented 1 year ago

Hi carderne, thanks for the reply.

I tried python -m sigexport.main ~/signal-chats and received the following:

PS C:\Users\ABC> python -m sigexport.main ~/signal-chats Using Docker to extract data, this may take a while the first time! Exception in thread Thread-2 (_readerthread): Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64qbz5n2kfra8p0\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1499, in _readerthread buffer.append(fh.read()) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2288.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 611: character maps to

Docker process failed, see logs below: Command '['docker', 'run', '--rm', '--volume=C:\Users\ABC\AppData\Roaming\Signal:/Signal', 'carderne/sigexport:latest']' returned non-zero exit status 1.

carderne commented 1 year ago

This is related to #72 and #78. Can you just ensure you're on the latest version by running pip install signal-export==1.5.3.

Also try running it with --verbose:

python -m sigexport.main ~/signal-chats --verbose
dmct10 commented 1 year ago

PS C:\Users\ABC> pip install signal-export==1.5.3. Collecting signal-export==1.5.3. Downloading signal_export-1.5.3-py3-none-any.whl (15 kB) Requirement already satisfied: typer[all]>=0.7.0 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from signal-export==1.5.3.) (0.7.0) Requirement already satisfied: Markdown>=3.4.1 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from signal-export==1.5.3.) (3.4.1) Requirement already satisfied: emoji>=1.7.0 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from signal-export==1.5.3.) (2.2.0) Requirement already satisfied: beautifulsoup4>=4.11.1 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from signal-export==1.5.3.) (4.11.1) Requirement already satisfied: soupsieve>1.2 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from beautifulsoup4>=4.11.1->signal-export==1.5.3.) (2.3.2.post1) Requirement already satisfied: click<9.0.0,>=7.1.1 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from typer[all]>=0.7.0->signal-export==1.5.3.) (8.1.3) Requirement already satisfied: colorama<0.5.0,>=0.4.3 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from typer[all]>=0.7.0->signal-export==1.5.3.) (0.4.6) Requirement already satisfied: rich<13.0.0,>=10.11.0 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from typer[all]>=0.7.0->signal-export==1.5.3.) (12.6.0) Requirement already satisfied: shellingham<2.0.0,>=1.3.0 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from typer[all]>=0.7.0->signal-export==1.5.3.) (1.5.0) Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from rich<13.0.0,>=10.11.0->typer[all]>=0.7.0->signal-export==1.5.3.) (0.9.1) Requirement already satisfied: pygments<3.0.0,>=2.6.0 in c:\users\abc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from rich<13.0.0,>=10.11.0->typer[all]>=0.7.0->signal-export==1.5.3.) (2.13.0) Installing collected packages: signal-export Attempting uninstall: signal-export Found existing installation: signal-export 1.3.0 Uninstalling signal-export-1.3.0: Successfully uninstalled signal-export-1.3.0 WARNING: The script sigexport.exe is installed in 'C:\Users\ABC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed signal-export-1.5.3

[notice] A new release of pip available: 22.2.2 -> 22.3.1 [notice] To update, run: C:\Users\ABC\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip PS C:\Users\ABC> python -m sigexport.main ~/signal-chats --verbose Fetching data from C:\Users\ABC\AppData\Roaming\Signal\sql\db.sqlite

Using Docker to extract data, this may take a while the first time! Docker process failed, see logs below: Command '['docker', 'run', '--rm', '--volume=C:\Users\ABC\AppData\Roaming\Signal:/Signal', 'carderne/sigexport:v1.5.3', '--verbose']' returned non-zero exit status 127. PS C:\Users\ABC>

sophiawisdom commented 1 year ago

I'm having the same problem as @dmct10. Here's what I get from executing

with ~/signal-chats as destination

C:\Users\Sophia>python -m sigexport.main ~/signal-chats
Using Docker to extract data, this may take a while the first time!
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1479, in _readerthread
    buffer.append(fh.read())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 611: character maps to <undefined>
Docker process failed, see logs below:
Command '['docker', 'run', '--rm', '--volume=C:\\Users\\Sophia\\AppData\\Roaming\\Signal:/Signal', 'carderne/sigexport:v1.5.3']' returned non-zero exit status 1.

C:\Users\Sophia>

with windows-y .\signal-chats as destination

C:\Users\Sophia>python -m sigexport.main .\signal-chats
Using Docker to extract data, this may take a while the first time!
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1479, in _readerthread
    buffer.append(fh.read())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 611: character maps to <undefined>
Docker process failed, see logs below:
Command '['docker', 'run', '--rm', '--volume=C:\\Users\\Sophia\\AppData\\Roaming\\Signal:/Signal', 'carderne/sigexport:v1.5.3']' returned non-zero exit status 1.

signal-export version:

C:\Users\Sophia>pip3 show signal-export
Name: signal-export
Version: 1.5.3
Summary: Export Signal conversations to Markdown and HTML
Home-page:
Author:
Author-email: Chris Arderne <chris@rdrn.me>
License: BSD 3-Clause License
Location: c:\users\sophia\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages
Requires: beautifulsoup4, emoji, Markdown, typer
Required-by:

C:\Users\Sophia>

with --verbose it's even shorter

C:\Users\Sophia>python -m sigexport.main ~/signal-chats --verbose
Fetching data from C:\Users\Sophia\AppData\Roaming\Signal\sql\db.sqlite

Using Docker to extract data, this may take a while the first time!
Docker process failed, see logs below:
Command '['docker', 'run', '--rm', '--volume=C:\\Users\\Sophia\\AppData\\Roaming\\Signal:/Signal', 'carderne/sigexport:v1.5.3', '--verbose']' returned non-zero exit status 1.

C:\Users\Sophia>
carderne commented 1 year ago

This is presumably a cp1252 issue, that I would've hoped was fixed by PR #80 (discussed in issues #72 and #78)...

I have just some more encoding= in https://github.com/carderne/signal-export/commit/170e8a2b1137c9f04ed17e9bb5025b2b7692d1e1. You can try this out by pip install signal-export==1.5.4 and see if anything improves.

I don't have time to investigate this (or a Windows machine/VM handy) so any PR/progress is very welcome.

stnslwk commented 1 year ago

I have a similar issue on 1.5.5 when running python -m sigexport.main ~/signal-chats:

Using Docker to extract data, this may take a while the first time!
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Program Files\Python39\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python39\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python39\lib\subprocess.py", line 1475, in _readerthread
    buffer.append(fh.read())
  File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 611: character maps to <undefined>