ilius / starcal

StarCalendar: Full-featured International Calendar for Linux Desktop
https://ilius.github.io/starcal/
GNU Affero General Public License v3.0
153 stars 22 forks source link

Couldn't run starcal2 after installing on Ubuntu 14.04 #9

Closed amirkarimi closed 10 years ago

amirkarimi commented 10 years ago

I keep my home folder in another partition, so after installing Ubuntu 14.04 starcal2 was there. I tried uninstall process then installed it again. But I get some errors.

Here the installation log:

$ sudo bash ./install-debian
find: `scal2': No such file or directory
dpkg-deb: building package `starcal2' in `starcal2_2.3.3-1_all.deb'.
Package file starcal2_2.3.3-1_all.deb created, installing...
(Reading database ... 182361 files and directories currently installed.)
Preparing to unpack starcal2_2.3.3-1_all.deb ...
Unpacking starcal2 (2.3.3) over (2.3.3) ...
Setting up starcal2 (2.3.3) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.54ubuntu1) ...

And here the errors I get:

$ starcal2
error while loading plugin "/usr/share/starcal2/plugins/iran-holidays.hol": no such file!

error while loading plugin "/usr/share/starcal2/plugins/pray_times.py": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-ancient.spg": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-jalali.spg": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-jalali-2.spg": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-hijri.spg": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-gregorian.spg": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-gregorian-2.spg": no such file!

error while loading plugin "/usr/share/starcal2/plugins/iran-hijri-2.spg": no such file!

^CTraceback (most recent call last):
  File "/usr/local/share/starcal2/scal2/ui_gtk/starcal2.py", line 1216, in <module>
    sys.exit(main())
  File "/usr/local/share/starcal2/scal2/ui_gtk/starcal2.py", line 1212, in main
    return gtk.main()
KeyboardInterrupt

Maybe I should clear some files or directories to allow a clean installation.

ilius commented 10 years ago

When you have a fresh installed system, so starcal is not installed. The directory in your home partition was probably the source archive that you had extracted, but not anymore because you deleted it's files by uninstall script. The uninstall script should be only used in systems that their package manager in not supported (like Slackware, Gentoo, ...), and it shouldn't be used in Debian-based or RPM-based or Arch-based systems. And uninstall should be only executed from installed folder, which is "/usr/share/starcal2/uninstall", as mentioned in the README file

Anyway, you just need to download the latest release again and install it again. Please take a look at README file.

amirkarimi commented 10 years ago

I did what you said and sent the result. Starcal didn't run.

amirkarimi commented 10 years ago

/usr/share/starcal2/plugins wasn't accessible to the current user. After giving the permission error changed to this:

error while loading plugin "/usr/share/starcal2/plugins/iran-holidays.hol": no such file!

Traceback (most recent call last):
  File "/usr/local/share/starcal2/scal2/plugin_man.py", line 154, in loadExternalPlugin
    mod = __import__(name)
  File "/usr/share/starcal2/plugins/pray_times.py", line 30, in <module>
    from tzlocal import get_localzone
ImportError: No module named tzlocal

I have holidays-iran.hol instead of iran-holidays.hol in plugins folder. So I'm looking for the config file wher I can rename that.

amirkarimi commented 10 years ago

The first error is gone by renaming the hol file (of course I've found the conf files but because there are two files which should be changed, I prefer to rename the file instead). But other errors are still there:

Traceback (most recent call last):
  File "/usr/local/share/starcal2/scal2/plugin_man.py", line 154, in loadExternalPlugin
    mod = __import__(name)
  File "/usr/share/starcal2/plugins/pray_times.py", line 30, in <module>
    from tzlocal import get_localzone
ImportError: No module named tzlocal
ilius commented 10 years ago

You can ignore the plugin error.

But about the last error (No module named tzlocal): Try this command: sudo chmod -R 755 /usr/share/starcal2 And run the program again

But how did you install the program? Did you use install-debian? That shouldn't be happening

amirkarimi commented 10 years ago

The same result :(

All folders owner and group was set to root so I tried sudo chown -R my_user_name:root /usr/share/starcal2 but again nothing.

amirkarimi commented 10 years ago

Python version is 2.7.6 if it helps.

ilius commented 10 years ago

Please download the latest codes again: http://github.com/ilius/starcal/tarball/master and install and test it again

amirkarimi commented 10 years ago

Here the result:

$ starcal2
error while loading plugin "/usr/share/starcal2/plugins/iran-holidays.hol": no such file!

Traceback (most recent call last):
  File "/usr/local/share/starcal2/scal2/plugin_man.py", line 154, in loadExternalPlugin
    mod = __import__(name)
  File "/usr/share/starcal2/plugins/pray_times.py", line 52, in <module>
    from scal2.time_utils import getUtcOffsetByJd, getUtcOffsetCurrent, getEpochFromJd
ImportError: cannot import name getUtcOffsetByJd

Before the error, a window appears on screen and disappears immediately. It's so fast that I can't find out its content. Actually it's just the shadow of the window.

amirkarimi commented 10 years ago

I'm new to Python but I want to debug this error. Would you please tel me where can I begin from? I opened up /usr/share/starcal2 folder and try to change the code and see the results.

ilius commented 10 years ago

Make sure python-appindicator package is installled

And open file ~/.starcal2/ui.conf and make sure that this is set: useAppIndicator = True

amirkarimi commented 10 years ago

python-appindicator wasn't installed. Starcal now works correctly after installing it. Thanks so much.

Of course it could be checked by the installer. Is it OK to add depends+=('python-appindicator') here?

ilius commented 10 years ago

I added a new script install-ubuntu

On Tue, May 13, 2014 at 12:19 PM, Amir Karimi notifications@github.comwrote:

python-appindicator wasn't installed. Starcal now works correctly after installing it. Thanks so much.

Of course it could be checked by the installer. Is it OK to add depends+=('python-appindicator') herehttps://github.com/ilius/starcal/blob/master/install-debian#L47 ?

— Reply to this email directly or view it on GitHubhttps://github.com/ilius/starcal/issues/9#issuecomment-42926689 .

ilius commented 10 years ago

Yes, you can do that for you own. I was trying to check in install-debian if the user is using indicator or not. but that checking apparently is not working on the latest Ubuntu

On Tue, May 13, 2014 at 12:22 PM, Saeed Rasooli saeed.gnu@gmail.com wrote:

I added a new script install-ubuntu

On Tue, May 13, 2014 at 12:19 PM, Amir Karimi notifications@github.comwrote:

python-appindicator wasn't installed. Starcal now works correctly after installing it. Thanks so much.

Of course it could be checked by the installer. Is it OK to add depends+=('python-appindicator') herehttps://github.com/ilius/starcal/blob/master/install-debian#L47 ?

— Reply to this email directly or view it on GitHubhttps://github.com/ilius/starcal/issues/9#issuecomment-42926689 .

amirkarimi commented 10 years ago

I didn't notice lines 48-50. They are commented!

ilius commented 10 years ago

I commented it because it wasn't working

On Tue, May 13, 2014 at 12:26 PM, Amir Karimi notifications@github.comwrote:

I didn't notice lines (48-50)[ https://github.com/ilius/starcal/blob/master/install-debian#L48-L50]. They are commented!

— Reply to this email directly or view it on GitHubhttps://github.com/ilius/starcal/issues/9#issuecomment-42927194 .