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

Error `invalid syntax (event_lib.py, line 2232)` #60

Closed ghaffarian closed 4 years ago

ghaffarian commented 4 years ago

I've been using Star-Calendar3 (v3.1.1) during 1398 with no problems on my Ubuntu-16.04 (x64) machine. After Norooz of 1399, I downloaded the latest release (v3.1.8-1_all.deb) and installed it. DPKG didn't print any errors and the installation was fine, but after running starcal3 it prints the error below and exits immediately:

$ starcal3 
Local Timezone: Asia/Tehran
invalid syntax (event_lib.py, line 2227)
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

Here are some information about my system:

OS: Ubuntu 16.04.6 LTS x86_64
Kernel: Linux 4.15.0-91-generic x86_64
Shell: bash 4.3.48
Terminal: gnome-terminal
Desktop Environment: Unity
Window Manager: Compiz
ghaffarian commented 4 years ago

I thought I found the cause for the problem, but unfortunately I was wrong. I found that after installing Anaconda on my system, the default Python paths in my shell had changed to those of Anaconda (Python-3.7.0). This was due to a mistake in my .bashrc, which I fixed and now everything is back to Ubuntu's defaults:

$ python --version
Python 2.7.12

$ which python
/usr/bin/python

$ python3 --version
Python 3.5.2

$ which python3
/usr/bin/python3

I also installed the latest version which you released lately, but the error is still the same:

$ starcal3 --version
Local Timezone: Asia/Tehran
3.1.9

$ starcal3 
Local Timezone: Asia/Tehran
invalid syntax (event_lib.py, line 2232)
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

$ locate event_lib.py
/usr/share/starcal3/scal3/event_lib.py
ghaffarian commented 4 years ago

Another try: I removed the released DEB package (starcal3_3.1.9-1_all.deb) installation and tried installing from master. Nothing changed and the error is the same. Here is the output:

$ sudo apt remove starcal3 
[sudo] password for seyed: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  starcal3
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 3,072 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 599566 files and directories currently installed.)
Removing starcal3 (3.1.9) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...

$ git clone https://github.com/ilius/starcal.git
Cloning into 'starcal'...
remote: Enumerating objects: 332, done.
remote: Counting objects: 100% (332/332), done.
remote: Compressing objects: 100% (242/242), done.
remote: Total 25908 (delta 191), reused 191 (delta 89), pack-reused 25576
Receiving objects: 100% (25908/25908), 14.47 MiB | 180.00 KiB/s, done.
Resolving deltas: 100% (19699/19699), done.
Checking connectivity... done.

$ sudo bash ./install-ubuntu 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'gir1.2-appindicator3-0.1' for glob 'gir1.2-appindicator3*'
gir1.2-appindicator3-0.1 is already the newest version (12.10.1+16.04.20170215-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
git version 2.7.4
From https://github.com/ilius/starcal
 * branch            HEAD       -> FETCH_HEAD
Using /usr/bin/python3
+ DIR=/tmp/starcal3-install-deb/usr/share/starcal3
+ rm -Rf /tmp/starcal3-install-deb/usr/share/starcal3/.git
+ rm -Rf /tmp/starcal3-install-deb/usr/share/starcal3/.gitignore
+ rm -Rf '/tmp/starcal3-install-deb/usr/share/starcal3/.Trash*'
+ rm -Rf /tmp/starcal3-install-deb/usr/share/starcal3/google-api-python-client/.git
+ rm -Rf '/tmp/starcal3-install-deb/usr/share/starcal3/google-api-python-client/.hg*'
+ find /tmp/starcal3-install-deb/usr/share/starcal3 -name __pycache__ -exec rm -R '{}' ';'
+ find /tmp/starcal3-install-deb/usr/share/starcal3 -type d -empty -delete
+ set +x
dpkg-deb: building package 'starcal3' in 'starcal3_3.1.9-1-geebeb44-1_all.deb'.
Package file starcal3_3.1.9-1-geebeb44-1_all.deb created, installing...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-httplib2 is already the newest version (0.9.1+dfsg-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Selecting previously unselected package starcal3.
(Reading database ... 599095 files and directories currently installed.)
Preparing to unpack starcal3_3.1.9-1-geebeb44-1_all.deb ...
Unpacking starcal3 (3.1.9-1-geebeb44) ...
Setting up starcal3 (3.1.9-1-geebeb44) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...

$ starcal3 
Local Timezone: Asia/Tehran
invalid syntax (event_lib.py, line 2232)
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

$ locate event_lib.py
/usr/share/starcal3/scal3/event_lib.py
ghaffarian commented 4 years ago

Related section from /starcal3/scal3/event_lib.py, specially line #2232:

image

ilius commented 4 years ago

Just pushed a fix. Please download the master branch from http://github.com/ilius/starcal/tarball/master Then install with sudo ./install-debian

Thanks