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

config.ini location on mac #120

@kidpixo

Description

@kidpixo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions