Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

afc wont start #15

Closed
theguy000 opened this issue Nov 19, 2021 · 3 comments
Closed

afc wont start #15

theguy000 opened this issue Nov 19, 2021 · 3 comments

Comments

@theguy000
Copy link

theguy000 commented Nov 19, 2021

Describe the bug
afc-gui wont start and says

gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/usr/share/afc-gui/MAINGUI.glade”: No such file or directory (4)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'afc-gui'
  2. See error

Expected behavior
Traceback (most recent call last):
File "/usr/bin/afc-gui", line 188, in
builder.add_from_file(pathglade)
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/usr/share/afc-gui/MAINGUI.glade”: No such file or directory (4)

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
...................................................................
You should never use relative paths to files, so you need to figure out an absolute path at runtime usually by defining an install prefix at build time. Also ideally you use GResources to simplify the process and improve performance.

An example would be something like this:

https://github.com/pithos/pithos/blob/master/bin/meson.build
https://github.com/pithos/pithos/blob/master/bin/pithos.in#L40-L41
See also: https://developer.gnome.org/gio/stable/GResource.html

You can get more help if you stop by #newcomers on ircs://irc.gimp.net or https://riot.im/app/#/room/#gimpnet#newcomers:matrix.org

I tried to google the answer. But it was too geeky for me.
............................................................
Linux Asus-s451lb 5.13.19-2-MANJARO #1 SMP PREEMPT Sun Sep 19 21:31:53 UTC 2021 x86_64 GNU/Linux

@Greifent
Copy link
Owner

Hi, have you installed the program using gitpack or manually? I just tried with gitpack and its working fine.
I'll take a look at what you suggested, this is the only project I've done using GTK so unfortunately my experience is limited

@dora-07
Copy link

dora-07 commented Feb 19, 2022

Actually I had the same problem
So the problem is the readme file says to move the afc-gui and MAINGUI.glade to /usr/bin and when executed the code checks for the MAINGUI.glade file in the /usr/share directory

Solution:
Just edit the afc-gui file with a text editor and set
pathglade = "/usr/bin/MAINGUI.glade" (or where ever you have moved the file to)

Hope this helps.

@Greifent
Copy link
Owner

Thanks @kniloy07, that was a error on the readme, i didnt noticed it, i'm going to update the readme with the correct path, thanks for bringing that up, it will say /usr/share/afc-gui

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

No branches or pull requests

3 participants