Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

config.ini location on mac #120

Open
kidpixo opened this issue Jul 25, 2019 · 0 comments
Open

config.ini location on mac #120

kidpixo opened this issue Jul 25, 2019 · 0 comments

Comments

@kidpixo
Copy link

kidpixo commented Jul 25, 2019

Python Version : Python 3.6.9
OS: macOS Sierra 10.12.6 16G2016 x86_64
Shell: bash 5.0.7

I could not run telegram-export directly

$telegram-export --list-dialogs
# or
$telegram-export --list-dialogs --config-file ~/.config/telegram-export/config.ini

import: unable to open X server `localhost:0.0' @ error/import.c/ImportImageCommand/360.
/Users/damo_ma/.local/bin/telegram-export: line 2: syntax error near unexpected token `"telegram_export",'
/Users/damo_ma/.local/bin/telegram-export: line 2: `runpy.run_module("telegram_export", run_name="__main__", alter_sys=True)'

If I start an Xserver it just hang without any output generated. I set DEBUG level in config.ini.

Running it as python module I found out:

python -m telegram_export --list-dialogs
No config file! Make one in /Users/$USER/Library/Application Support/telegram-export/config.ini and find an example config at https://github.com/expectocode/telegram-export/blob/master/config.ini.example.Alternatively, use --config-file FILE

/Users/$USER/Library/Application Support/ is where Apple/Mac app store stuff, but I follow XDG Base Directory and have it at ~/.config/telegram-export/config.ini.

telegram-export is not aware of this location on mac, passing

python -m telegram_export --list-dialogs --config-file ~/.config/telegram-export/config.ini

does work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant