gentakojima / emojione-picker-ubuntu

Emoji picker for Ubuntu based on icons by Emojione
239 stars 14 forks source link

Application does not start because assets folder in not in it's path #6

Closed rigved closed 8 years ago

rigved commented 8 years ago

On Ubuntu 14.04 (running Unity), I installed the application by creating the .deb file using the following command:

equivs-build debian_package.ctl

After installing the .deb file, I did not logout of my current session + login again. Instead, I directly tried to run the application by running "emojione-picker" via "run command" (Alt+F2). The application did not start.

On running the command in the terminal, I got this error message:

$ /usr/bin/emojione-picker
Traceback (most recent call last):
  File "/usr/bin/emojione-picker", line 147, in <module>
    pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(directory + "/assets/categories/" + category + ".svg", iconsizes[1], iconsizes[2])
gi._glib.GError: Failed to open file '<path_to_my_home_folder_directory>/assets/categories/recent.svg': No such file or directory

It's trying to find the assets folder in my home directory because the folder "~/.local/share/emojione-picker" was not created by the debian package. After creating the folder "~/.local/share/emojione-picker" and copying "assets" to that folder, I was able to start the application using the "Alt+F2" method.

gentakojima commented 8 years ago

Thank you for taking your time to send this complete report. You've been very helpful. I changed some code yesterday in commit eda3243 that may have produced this.

Until now, the program tried to find the assets in this order:

Unfortunately, the second one had an error. Instead of using the script directory, the code resolved to the current directory, so it resolved to your home.

I changed now the code in the commit 14559a4 to resolve the script directory properly, and moved that option to the last place, so it doesn't fire /usr/bin and /usr/local/bin instead of the script directory if run standalone.

So, this is the order now:

I will leave this open for now since I don't have the time now test all the possible scenarios properly.

gentakojima commented 8 years ago

After reviewing it for a while, I think everything is covered now, so I'm closing this. Thank you again, rigved.