python-liblarch fails to configure

Bug #1275642 reported by Tom Metro on 2014-02-03
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Getting Things GNOME!
High
Parin Porecha

Bug Description

I appear to be having a problem configuring the python-liblarch (2.2.0.r157~ubuntu12.04.1) package on 12.04.1, which appears to be coming from the GTG PPA (gtg-daily).

I went to install something and saw:

The following partially installed packages will be configured:
  python-liblarch

apparently left over from a prior update. When it got to the step of configuring python-liblarch, I see:

Setting up python-liblarch (2.2.0.r157~ubuntu12.04.1) ...
SyntaxError: ('invalid syntax', ('/usr/lib/python2.7/dist-packages/liblarch/tree.py', 423, 30, " print(output, end=' ')\n"))

dpkg: error processing python-liblarch (--configure):
 subprocess installed post-installation script returned error exit status 101
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of gtg:
 gtg depends on python-liblarch (>= 2.1.0); however:
  Package python-liblarch is not configured yet.

I tried following the suggestion in bug 1038466 of removing python-liblarch (that bug was actually about python-liblarch_gtk) and then reinstalling gtg, but that just triggered the same error when python-liblarch was attempted to be configured again.

Parin Porecha (parinporecha) wrote :

Hi Tom,

liblarch was ported to python3 recently.
Apparently, ubuntu installer is using python2 to compile liblarch and this is causing the bug.
I've sent a mail to Luca Falavigna (GTG's deb package maintainer), and we're trying to patch is as soon as possible.

This bug has already been reported (Bug #1275052).

tags: added: liblarch
Parin Porecha (parinporecha) wrote :

Sorry, this bug is not a duplicate but related to Bug #1275052

Changed in gtg:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 0.3.2
assignee: nobody → Parin Porecha (parinporecha)
Nimit Shah (nimit-svnit) wrote :

Hi all,
We are releasing a legacy branch of GTG for all the users who are facing configuration issues with Python3 and GTK-3.
This branch contains the code till revision 1350. Mind you, not all changes made in the daily branch will get reflected in this one. This is just for the people who are having issues for running the Python3 and GTK3 version of the code.
Here is the link to the PPA: https://launchpad.net/~parinporecha/+archive/gtg-legacy

Changed in gtg:
importance: Critical → Undecided
milestone: 0.3.2 → none
Parin Porecha (parinporecha) wrote :

Hi,

I've updated liblarch dependencies and now installing liblarch via gtg-daily ppa should work fine.
Here's the link to the recipe - https://code.launchpad.net/~gtg/+recipe/liblarch-daily
and the ppa - https://code.launchpad.net/~gtg/+archive/gtg-daily

The daily build by default works for Quantal (12.10) and Saucy (13.10), and Trusty (14.04)
We've removed Precise (12.04) since the GTK version it supports (3.0) is quite old and does not work very well with the one liblarch has been ported to (3.8)

Marking this as 'Fix Released'

Tom > Thanks for reporting the bug :-)

Changed in gtg:
importance: Undecided → High
status: Triaged → Fix Released
milestone: none → 0.3.2
aslam karachiwala (akwala) wrote :

Just tried to upgrade...

Setting up python-liblarch (2.2.0.r158~ubuntu13.10.1) ...
  File "/usr/lib/python2.7/dist-packages/liblarch/tree.py", line 423
    print(output, end=' ')
                     ^
SyntaxError: invalid syntax

dpkg: error processing python-liblarch (--configure):
 subprocess installed post-installation script returned error exit status 101
dpkg: dependency problems prevent configuration of gtg:
 gtg depends on python-liblarch (>= 2.1.0); however:
  Package python-liblarch is not configured yet.

Hi Aslam,
Latest liblarch uses python3. While you seem to be using a python2
environment.

Nimit Shah

On Mon, Mar 10, 2014 at 10:00 PM, aslam karachiwala <
<email address hidden>> wrote:

> Just tried to upgrade...
>
> Setting up python-liblarch (2.2.0.r158~ubuntu13.10.1) ...
> File "/usr/lib/python2.7/dist-packages/liblarch/tree.py", line 423
> print(output, end=' ')
> ^
> SyntaxError: invalid syntax
>
> dpkg: error processing python-liblarch (--configure):
> subprocess installed post-installation script returned error exit status
> 101
> dpkg: dependency problems prevent configuration of gtg:
> gtg depends on python-liblarch (>= 2.1.0); however:
> Package python-liblarch is not configured yet.
>
> --
> You received this bug notification because you are subscribed to Getting
> Things GNOME!.
> Matching subscriptions: bugs
> https://bugs.launchpad.net/bugs/1275642
>
> Title:
> python-liblarch fails to configure
>
> Status in Getting Things GNOME!:
> Fix Released
>
> Bug description:
> I appear to be having a problem configuring the python-liblarch
> (2.2.0.r157~ubuntu12.04.1) package on 12.04.1, which appears to be
> coming from the GTG PPA (gtg-daily).
>
> I went to install something and saw:
>
> The following partially installed packages will be configured:
> python-liblarch
>
> apparently left over from a prior update. When it got to the step of
> configuring python-liblarch, I see:
>
> Setting up python-liblarch (2.2.0.r157~ubuntu12.04.1) ...
> SyntaxError: ('invalid syntax',
> ('/usr/lib/python2.7/dist-packages/liblarch/tree.py', 423, 30, "
> print(output, end=' ')\n"))
>
> dpkg: error processing python-liblarch (--configure):
> subprocess installed post-installation script returned error exit
> status 101
> No apport report written because MaxReports is reached already
> dpkg:
> dependency problems prevent configuration of gtg:
> gtg depends on python-liblarch (>= 2.1.0); however:
> Package python-liblarch is not configured yet.
>
>
> I tried following the suggestion in bug 1038466 of removing
> python-liblarch (that bug was actually about python-liblarch_gtk) and then
> reinstalling gtg, but that just triggered the same error when
> python-liblarch was attempted to be configured again.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gtg/+bug/1275642/+subscriptions
>

Parin Porecha (parinporecha) wrote :

Hi,

I've updated the debhelper rule in liblarch to python3 (sorry, I must've overlooked it).

Aslam, can you please try to install liblarch again ?

aslam karachiwala (akwala) wrote :

This time it installed (no error re congifuration) but still gave the syntax error:

Compiling /usr/lib/pymodules/python2.7/liblarch/tree.py ...
  File "/usr/lib/pymodules/python2.7/liblarch/tree.py", line 423
    print(output, end=' ')
                     ^
SyntaxError: invalid syntax

Setting up python-liblarch (2.2.0.r159~ubuntu13.10.1) ...
Setting up gtg (0.3.r1363~ubuntu13.10.1) ...
Processing triggers for python-support ...
Compiling /usr/lib/pymodules/python2.7/liblarch/tree.py ...
  File "/usr/lib/pymodules/python2.7/liblarch/tree.py", line 423
    print(output, end=' ')
                     ^
SyntaxError: invalid syntax
======

The same error occurs at runtime:

$ gtg
Traceback (most recent call last):
  File "/usr/bin/gtg", line 90, in <module>
    main()
  File "/usr/bin/gtg", line 83, in main
    elif import_liblarch(options.local_liblarch):
  File "/usr/share/gtg/GTG/tools/import_liblarch.py", line 60, in import_liblarch
    has_libraries, missing = check_liblarch()
  File "/usr/share/gtg/GTG/tools/import_liblarch.py", line 42, in check_liblarch
    import liblarch
  File "/usr/lib/pymodules/python2.7/liblarch/__init__.py", line 22, in <module>
    from liblarch.tree import MainTree
  File "/usr/lib/pymodules/python2.7/liblarch/tree.py", line 423
    print(output, end=' ')
                     ^
SyntaxError: invalid syntax
=====

I also tried explicitly with python3...

$ python3 /usr/share/gtg/gtg
GTG can't find liblarch and liblarch_gtk. To install missing libraries,
run the following command in the current folder:

git clone https://github.com/liblarch/liblarch ../liblarch

More information about liblarch: https://live.gnome.org/liblarch/
=====

Jan Pleva (jenik-pleva) wrote :

grrrr, so sad.... I'm not able to run GTG on still supported 12.04.4 :(

Parin Porecha (parinporecha) wrote :

Jan > Please use the legacy GTG ppa for 12.04 (https://bugs.launchpad.net/gtg/+bug/1275642/comments/3)

I am working on solving the python-liblarch installation problem, but it will support 12.10 and newer distros

Changed in gtg:
status: Fix Released → In Progress
Jan Pleva (jenik-pleva) wrote :

@Parin that is the problem. I'm right now jumping throw supported distributions only (work usage). so it's little bit problematic for me to update to, in this case not supported, distribution. I did use legacy before, but GTG having dependency on newest package, so it want to update it and that is not what I want to.

Jan Pleva (jenik-pleva) wrote :

Would it be possible to add old versions for legacy, so it will be possible to force installation without update of python-liblarch?

Jan Pleva (jenik-pleva) wrote :

Whooo, I made it somehow, but do not know how. It looks like someone fixed this in stable repository? I found two packages compatible to each other and now it is working fine again, and even there are latest withou arguing about update, so there is no lock version needed. I did remove some of GTG repository and adding others and woala - it is working right now.

plevajan@laptop:~$ apt-cache policy gtg
gtg:
  Installed: 0.3.r1332~ubuntu12.04.1
  Candidate: 0.3.r1332~ubuntu12.04.1
  Version table:
 *** 0.3.r1332~ubuntu12.04.1 0
       1100 http://ppa.launchpad.net/gtg/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3-0~1350~ubuntu12.04.1 0
       1100 http://ppa.launchpad.net/parinporecha/gtg-legacy/ubuntu/ precise/main amd64 Packages
     0.2.4-6 0
       1100 http://cz.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
plevajan@laptop:~$ apt-cache policy python-liblarch
python-liblarch:
  Installed: 2.2.0.r155~ubuntu12.04.1
  Candidate: 2.2.0.r155~ubuntu12.04.1
  Version table:
 *** 2.2.0.r155~ubuntu12.04.1 0
       1100 http://ppa.launchpad.net/gtg/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     2.2.0-0~158~ubuntu12.04.1 0
       1100 http://ppa.launchpad.net/parinporecha/gtg-legacy/ubuntu/ precise/main amd64 Packages

gary mort (garyamort2) wrote :

Either the daily package for liblarch or gtg needs to be changed.

I installed the python3-liblarch package from the daily repository. Instead of installing to /usr/lib/python3/dist-packages it installed to /usr/lib/python3.7/dist-packages - but this may have been due to an incorrect setting on my update-alternatives for python. Since I manually copied all the liblarch files from one folder to the other, I am not sure.

When trying to install gtg from daily,
apt-get install gtg=0.3.1.r70~ubuntu13.10.1

It would try to include python-liblarch with the install. Checking the dependencies with
sudo apt-cache showpkg gtg

Shows that python-liblarch is a dependency.

So either the dependency needs to be changed from python-liblarch to python3-liblarch or the python3-liblarch package must be modified so that it also declares itself as providing python-liblarch as well.

I pulled down the daily package via:
apt-get download gtg=0.3.1.r70~ubuntu13.10.1
and force installed it with
sudo dpkg -i --force gtg_0.3.1.r70~ubuntu13.10.1_all.deb

After that it seems to be working fine.

aslam karachiwala (akwala) wrote :

Bump...

What's up w/ this issue? I haven't been able to use GTG since this happened. I have python3/gtk3 (I'm now on Ubuntu 14.04). What do I need to do to be able to run the versions from the 'daily' repo?

Install of python3-liblarch fails if python-liblarch is present. Attempting to uninstall python-liblarch shows that gtg depends on it, which is what @garyamort2 reported as well.

Nimit Shah (nimit-svnit) wrote :

Hi Aslam,
Can you try this thing:
Uninstall gtg.
If python-liblarch is present, uninstall liblarch aswell.
Goto software centre and install gtg and liblarch.

GTG is not installing liblarch by default. We will figure out the solution
soon.

Nimit Shah

On Fri, Jul 18, 2014 at 4:29 AM, aslam karachiwala <
<email address hidden>> wrote:

> Bump...
>
> What's up w/ this issue? I haven't been able to use GTG since this
> happened. I have python3/gtk3 (I'm now on Ubuntu 14.04). What do I need
> to do to be able to run the versions from the 'daily' repo?
>
> Install of python3-liblarch fails if python-liblarch is present.
> Attempting to uninstall python-liblarch shows that gtg depends on it,
> which is what @garyamort2 reported as well.
>
> --
> You received this bug notification because you are subscribed to Getting
> Things GNOME!.
> Matching subscriptions: bugs
> https://bugs.launchpad.net/bugs/1275642
>
> Title:
> python-liblarch fails to configure
>
> Status in Getting Things GNOME!:
> In Progress
>
> Bug description:
> I appear to be having a problem configuring the python-liblarch
> (2.2.0.r157~ubuntu12.04.1) package on 12.04.1, which appears to be
> coming from the GTG PPA (gtg-daily).
>
> I went to install something and saw:
>
> The following partially installed packages will be configured:
> python-liblarch
>
> apparently left over from a prior update. When it got to the step of
> configuring python-liblarch, I see:
>
> Setting up python-liblarch (2.2.0.r157~ubuntu12.04.1) ...
> SyntaxError: ('invalid syntax',
> ('/usr/lib/python2.7/dist-packages/liblarch/tree.py', 423, 30, "
> print(output, end=' ')\n"))
>
> dpkg: error processing python-liblarch (--configure):
> subprocess installed post-installation script returned error exit
> status 101
> No apport report written because MaxReports is reached already
> dpkg:
> dependency problems prevent configuration of gtg:
> gtg depends on python-liblarch (>= 2.1.0); however:
> Package python-liblarch is not configured yet.
>
>
> I tried following the suggestion in bug 1038466 of removing
> python-liblarch (that bug was actually about python-liblarch_gtk) and then
> reinstalling gtg, but that just triggered the same error when
> python-liblarch was attempted to be configured again.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gtg/+bug/1275642/+subscriptions
>

aslam karachiwala (akwala) wrote :

I know of the legacy repo. Can you explain why GTG does not run despite the
presence of python3 & gtk3? I would appreciate knowing what makes my
generally up to-date system not current enough for GTG. What are the system
requirements for running the 'daily' updates?
On Feb 18, 2014 2:50 PM, "Nimit Shah" <email address hidden> wrote:

> Hi all,
> We are releasing a legacy branch of GTG for all the users who are facing
> configuration issues with Python3 and GTK-3.
> This branch contains the code till revision 1350. Mind you, not all
> changes made in the daily branch will get reflected in this one. This is
> just for the people who are having issues for running the Python3 and GTK3
> version of the code.
> Here is the link to the PPA:
> https://launchpad.net/~parinporecha/+archive/gtg-legacy
>
> ** Changed in: gtg
> Importance: Critical => Undecided
>
> ** Changed in: gtg
> Milestone: 0.3.2 => None
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1275642
>
> Title:
> python-liblarch fails to configure
>
> Status in Getting Things GNOME!:
> Triaged
>
> Bug description:
> I appear to be having a problem configuring the python-liblarch
> (2.2.0.r157~ubuntu12.04.1) package on 12.04.1, which appears to be
> coming from the GTG PPA (gtg-daily).
>
> I went to install something and saw:
>
> The following partially installed packages will be configured:
> python-liblarch
>
> apparently left over from a prior update. When it got to the step of
> configuring python-liblarch, I see:
>
> Setting up python-liblarch (2.2.0.r157~ubuntu12.04.1) ...
> SyntaxError: ('invalid syntax',
> ('/usr/lib/python2.7/dist-packages/liblarch/tree.py', 423, 30, "
> print(output, end=' ')\n"))
>
> dpkg: error processing python-liblarch (--configure):
> subprocess installed post-installation script returned error exit
> status 101
> No apport report written because MaxReports is reached already
> dpkg:
> dependency problems prevent configuration of gtg:
> gtg depends on python-liblarch (>= 2.1.0); however:
> Package python-liblarch is not configured yet.
>
>
> I tried following the suggestion in bug 1038466 of removing
> python-liblarch (that bug was actually about python-liblarch_gtk) and then
> reinstalling gtg, but that just triggered the same error when
> python-liblarch was attempted to be configured again.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gtg/+bug/1275642/+subscriptions
>

aslam karachiwala (akwala) wrote :
Download full text (3.6 KiB)

Pls disregard my previous msg. Gmail on my Android showed Nimit's post from 2/18 when I opened the thread and I thought it was in response to my post from earlier today.

Anyways... Here's what happened when I uninstalled gtg, autoremoved python-liblarch and then installed gtg. As you can see, python-liblarch does get installed when gtg is installed.
-----
$ sudo apt-get purge gtg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
   python-liblarch (2.1.0-2)
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
   gtg* (0.3.1.r78~ubuntu14.04.1)
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 10.5 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 535058 files and directories currently installed.)
Removing gtg (0.3.1.r78~ubuntu14.04.1) ...
Purging configuration files for gtg (0.3.1.r78~ubuntu14.04.1) ...
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 mime-support (3.54ubuntu1) ...

$ sudo apt-get autoremove python-liblarch
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python-liblarch
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 171 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 534594 files and directories currently installed.)
Removing python-liblarch (2.1.0-2) ...

$ sudo apt-get purge python-liblarch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'python-liblarch' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt-get install gtg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
   python-liblarch (2.1.0-2)
Suggested packages:
   bugz (0.10.1-3)
   python-cheetah (2.4.4-3.fakesyncbuild1)
   python-evolution ()
   python-geoclue (0.1.0-4build1)
   python-suds (0.4.1-11ubuntu0.1)
The following NEW packages will be installed:
   gtg (0.3.1.r78~ubuntu14.04.1)
   python-liblarch (2.1.0-2)
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.1 kB/3,654 kB of archives.
After this operation, 10.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe python-liblarch all 2.1.0-2 [27.1 kB]
Fetched 27.1 kB in 0s (113 kB/s)
Selecting previously unselected package python-liblarch.
(Reading database ... 534565 files and directories currently installed.)
Preparing to unpack .../python-liblarch_2.1.0-2_all.deb ...
Unpacking python-liblarch (2.1.0-2) ...
Selecting previously unselected package gtg.
P...

Read more...

aslam karachiwala (akwala) wrote :

Thought I'd strongarm the install so I forced an overwrite of python-liblarch (console output attached):
$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/python3-liblarch_3.0.0.r178~ubuntu14.04.1_all.deb

Now I have...
$ apt-cache policy python3-liblarch
python3-liblarch:
  Installed: 3.0.0.r178~ubuntu14.04.1
  Candidate: 3.0.0.r178~ubuntu14.04.1
  Version table:
 *** 3.0.0.r178~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/gtg/gtg-daily/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Then I tried running gtg. Below is the console output from the things I tried.
=====
$ gtg
bash: /usr/bin/gtg: Permission denied

$ ls -l /usr/bin/gtg
lrwxrwxrwx 1 root root 20 Jul 10 12:32 /usr/bin/gtg -> ../share/gtg/GTG/gtg

$ ls -l /usr/share/gtg/GTG
total 68K
drwxr-xr-x 4 root root 4.0K Jul 17 22:32 backends/
drwxr-xr-x 4 root root 4.0K Jul 17 22:32 core/
drwxr-xr-x 6 root root 4.0K Jul 17 22:32 gtk/
drwxr-xr-x 14 root root 4.0K Jul 17 22:32 plugins/
drwxr-xr-x 2 root root 4.0K Jul 17 22:32 __pycache__/
drwxr-xr-x 3 root root 4.0K Jul 17 22:32 tools/
-rw-r--r-- 1 root root 15K Jul 10 10:34 gtcli
-rw-r--r-- 1 root root 8.0K Jul 10 10:34 gtg
-rw-r--r-- 1 root root 2.2K Jul 10 10:34 gtg_new_task
-rw-r--r-- 1 root root 12K Jul 10 10:34 info.py
-rw-r--r-- 1 root root 2.3K Jul 10 10:34 __init__.py

$ python3 /usr/bin/gtg
Traceback (most recent call last):
  File "/usr/bin/gtg", line 57, in <module>
    from GTG import _
ImportError: No module named 'GTG'

$ ls -l /usr/share/gtg
total 36K
drwxr-xr-x 8 root root 4.0K Jul 17 22:32 GTG/
-rwxr-xr-x 1 root root 15K Jul 10 12:31 gtcli*
-rw-r--r-- 1 root root 1.5K Jul 10 10:34 gtcli_bash_completion
-rwxr-xr-x 1 root root 7.9K Jul 10 12:31 gtg*
-rwxr-xr-x 1 root root 2.1K Jul 10 12:31 gtg_new_task*

$ /usr/share/gtg/gtg
Traceback (most recent call last):
  File "/usr/share/gtg/gtg", line 59, in <module>
    from GTG.backends import BackendFactory
  File "/usr/share/gtg/GTG/backends/__init__.py", line 32, in <module>
    from GTG.backends.genericbackend import GenericBackend
  File "/usr/share/gtg/GTG/backends/genericbackend.py", line 33, in <module>
    from GTG.core import CoreConfig
  File "/usr/share/gtg/GTG/core/__init__.py", line 40, in <module>
    import configparser
ImportError: No module named configparser

$ python3 /usr/share/gtg/gtg
Traceback (most recent call last):
  File "/usr/share/gtg/gtg", line 61, in <module>
    from GTG.core.datastore import DataStore
  File "/usr/share/gtg/GTG/core/datastore.py", line 35, in <module>
    from GTG.core import requester
  File "/usr/share/gtg/GTG/core/requester.py", line 26, in <module>
    from GTG.core.tag import Tag
  File "/usr/share/gtg/GTG/core/tag.py", line 30, in <module>
    from liblarch import TreeNode
ImportError: No module named 'liblarch'

Izidor Matušov (izidor) on 2015-03-15
tags: added: github
Khurshid Alam (khurshid-alam) wrote :

>I installed the python3-liblarch package from the daily repository. Instead of installing to /usr/lib/python3/dist-packages it installed to /usr/lib/python2.7/dist-package

That's the problem. Manually coping liblarch and liblarch-gtk folders from /usr/lib/python2.7/dist-package to /usr/lib/python3/dist-packages solves the problem for me.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers