sillsdev / ptx2pdf

XeTeX based macro package for typesetting USFM formatted (Paratext output) scripture files
23 stars 8 forks source link

No such file or directory: /home/user/Paratext8Projects #911

Open burntsun opened 1 year ago

burntsun commented 1 year ago

I installed PTXPrint on Ubuntu. When I launch it, it fails to open. When I launch it from the terminal, I see this error:

Traceback (most recent call last):
  File "/usr/bin/ptxprint", line 331, in <module>
    mainw.setup_ini()
  File "/usr/lib/python3/dist-packages/ptxprint/gtkview.py", line 741, in setup_ini
    for d in os.listdir(self.settings_dir):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/Paratext8Projects'

I don't have a Paratext8Projects directory in my home directory. I think it would be better if PTXPrint recovered from this well and launched the program, or at least to displayed an error in a GUI.

davidg-sil commented 1 year ago

Most users do have paratext, so testing on machines without it has always been a bit sparse. Sorry for the unannounced bug. While PTXprint does not require you to have paratext installed, it does need to have a 'Paratext Directory' (discovered or set). You can tell it what that directory should be with the command-line argument -p /path/to/directory An empty directory is fine, if you're going to be e.g. using bundles from the DBL, or unwrapping backups from Paratext there.

If you have USFM you've been editing in some other scripture-editing program, then it expects that to be in a 'project directory', below the paratext directory. That directory should include the following:

burntsun commented 12 months ago

Thank you so much for the help!

mhosken commented 12 months ago

More. You don't need a settings.xml. ptxprint will generate one itself when it loads your project.

On Tue, 10 Oct 2023, 12:18 Burning Sun, @.***> wrote:

Thank you so much for the help!

— Reply to this email directly, view it on GitHub https://github.com/sillsdev/ptx2pdf/issues/911#issuecomment-1755104739, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLMO3MURYZQWFGQJXVXAZLX6UVG7AVCNFSM6AAAAAA46CYOECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJVGEYDINZTHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

davidg-sil commented 12 months ago

Is this a very recent change, @mhosken, or something that used to work but doesn't now, I wonder? I arrived at that set of criteria by trial and error, starting with just some USFM in an otherwise empty 'project' directory (without the settings.xml, I don't think the project directory was available on the menu).