run.py crashed with NameError in __main__: name 'env' is not defined

Bug #920166 reported by Frederik Elwert
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
quickly (Ubuntu)
New
Undecided
Unassigned

Bug Description

I just upgraded to Precise. When trying "quickly run" with a project of mine, I get this information:

$ quickly run
WARNING: Your project is out of date. Newly created projects use
GTK+ 3, PyGI, and GSettings. See https://wiki.ubuntu.com/Quickly/GTK3 for
porting information and when you have finished porting your code, run
'quickly upgrade' to get rid of this message.
Traceback (most recent call last):
  File "/usr/share/quickly/templates/ubuntu-application/run.py", line 73, in <module>
    subprocess.call(command_line, env=env)
NameError: name 'env' is not defined
FEHLER: Befehl run fehlgeschlagen
Wird abgebrochen

I understand the upgrade warning, but I’d still expect "quickly run" to succeed.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: quickly-ubuntu-template 11.12-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-10.17-generic 3.2.1
Uname: Linux 3.2.0-10-generic i686
ApportVersion: 1.91-0ubuntu1
Architecture: i386
Date: Sun Jan 22 22:07:45 2012
ExecutablePath: /usr/share/quickly/templates/ubuntu-application/run.py
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110803.1)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/quickly/templates/ubuntu-application/run.py
PythonArgs: ['/usr/share/quickly/templates/ubuntu-application/run.py']
QuicklyDataPath: /usr/share/quickly
QuicklyTemplates:
 /usr/share/quickly/templates/ubuntu-application
 /usr/share/quickly/templates/ubuntu-flash-game
 /usr/share/quickly/templates/ubuntu-pygame
 /usr/share/quickly/templates/ubuntu-cli
QuicklyTemplatesDirectories: /usr/share/quickly/templates/
SourcePackage: quickly
Title: run.py crashed with NameError in __main__: name 'env' is not defined
Traceback:
 Traceback (most recent call last):
   File "/usr/share/quickly/templates/ubuntu-application/run.py", line 73, in <module>
     subprocess.call(command_line, env=env)
 NameError: name 'env' is not defined
UpgradeStatus: Upgraded to precise on 2012-01-22 (0 days ago)
UserGroups: adm admin cdrom dialout games lpadmin plugdev sambashare

Revision history for this message
Frederik Elwert (frederik-elwert) wrote :
visibility: private → public
tags: removed: need-duplicate-check
Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

Okay, found it. "quickly run" seems to fail on projects that don’t have GSettings schemas, which will almost always be the case for pre-GTK3 projects. "env" is only defined in the if-branch which handles schema compilation, thus it is not defined when no schema is present.

I attached a tiny patch that should fix this, by ensuring env is always defined.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "quickly_run_ensure_env_is_defined.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.