Bug 752978 - gnome-shell-extension-tool crashed with NameError in __main__: name 'extensionjs_path' is not defined
Summary: gnome-shell-extension-tool crashed with NameError in __main__: name 'extensio...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-shell
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Owen Taylor
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:bf606c665e86dfe534a0c361ac4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-10 22:23 UTC by gregor
Modified: 2012-02-07 07:54 UTC (History)
10 users (show)

Fixed In Version: mutter-3.2.2-1.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 07:54:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 661623 0 None None None Never

Description gregor 2011-11-10 22:23:49 UTC
libreport version: 2.0.6
abrt_version:   2.0.4.981
cmdline:        /usr/bin/python /usr/bin/gnome-shell-extension-tool --create-extension
executable:     /usr/bin/gnome-shell-extension-tool
kernel:         3.1.0-7.fc16.x86_64
reason:         gnome-shell-extension-tool:151:<module>:NameError: name 'extensionjs_path' is not defined
time:           Thu Nov 10 23:19:48 2011
uid:            1000
username:       Benutzername

backtrace:
:gnome-shell-extension-tool:151:<module>:NameError: name 'extensionjs_path' is not defined
:
:Traceback (most recent call last):
:  File "/usr/bin/gnome-shell-extension-tool", line 151, in <module>
:    subprocess.Popen(['gnome-open', extensionjs_path])
:NameError: name 'extensionjs_path' is not defined
:
:Local variables in innermost frame:
:parser: <optparse.OptionParser instance at 0x7fd2c6eca9e0>
:subprocess: <module 'subprocess' from '/usr/lib64/python2.7/subprocess.pyc'>
:meta: {'shell-version': ['3.2.1'], 'uuid': 'arbeit_@heike', 'name': 'arbeit2', 'description': 'arbeit2'}
:path: '/home/Benutzername/.local/share/gnome-shell/extensions/arbeit_@heike/extension.js'
:filename: 'extension.js'
:contents: '\nconst St = imports.gi.St;\nconst Main = imports.ui.main;\nconst Tweener = imports.ui.tweener;\n\nlet text, button;\n\nfunction _hideHello() {\n    Main.uiGroup.remove_actor(text);\n    text = null;\n}\n\nfunction _showHello() {\n    if (!text) {\n        text = new St.Label({ style_class: \'helloworld-label\', text: "Hello, world!" });\n        Main.uiGroup.add_actor(text);\n    }\n\n    text.opacity = 255;\n\n    let monitor = Main.layoutManager.primaryMonitor;\n\n    text.set_position(Math.floor(monitor.width / 2 - text.width / 2),\n                      Math.floor(monitor.height / 2 - text.height / 2));\n\n    Tweener.addTween(text,\n                     { opacity: 0,\n                       time: 2,\n                       transition: \'easeOutQuad\',\n                       onComplete: _hideHello });\n}\n\nfunction init() {\n    button = new St.Bin({ style_class: \'panel-button\',\n                          reactive: true,\n                          can_focus: true,\n                          x_fill: true,\n                          y_fill: false,\n                          track_hover: true });\n    let icon = new St.Icon({ icon_name: \'system-run\',\n                             icon_type: St.IconType.SYMBOLIC,\n                             style_class: \'system-status-icon\' });\n\n    button.set_child(icon);\n    button.connect(\'button-press-event\', _showHello);\n}\n\nfunction enable() {\n    Main.panel._rightBox.insert_actor(button, 0);\n}\n\nfunction disable() {\n    Main.panel._rightBox.remove_actor(button);\n}\n'
:sample_uuid: 'arbeit_@heike'
:uuid: 'arbeit_@heike'
:tempfile: <module 'tempfile' from '/usr/lib64/python2.7/tempfile.pyc'>
:hostname: 'heike'
:SAMPLE_EXTENSION_FILES: {'stylesheet.css': '\n.helloworld-label {\n    font-size: 36px;\n    font-weight: bold;\n    color: #ffffff;\n    background-color: rgba(10,10,10,0.7);\n    border-radius: 5px;\n    padding: .5em;\n}\n', 'extension.js': '\nconst St = imports.gi.St;\nconst Main = imports.ui.main;\nconst Tweener = imports.ui.tweener;\n\nlet text, button;\n\nfunction _hideHello() {\n    Main.uiGroup.remove_actor(text);\n    text = null;\n}\n\nfunction _showHello() {\n    if (!text) {\n        text = new St.Label({ style_class: \'helloworld-label\', text: "Hello, world!" });\n        Main.uiGroup.add_actor(text);\n    }\n\n    text.opacity = 255;\n\n    let monitor = Main.layoutManager.primaryMonitor;\n\n    text.set_position(Math.floor(monitor.width / 2 - text.width / 2),\n                      Math.floor(monitor.height / 2 - text.height / 2));\n\n    Tweener.addTween(text,\n                     { opacity: 0,\n                       time: 2,\n                       transition: \'easeOutQuad\',\n                       onComplete: _hideHello });\n}\n\nfunction init() {\n    button = new St.Bin({ style_class: \'panel-button\',\n                          reactive: true,\n                          can_focus: true,\n                          x_fill: true,\n                          y_fill: false,\n                          track_hover: true });\n    let icon = new St.Icon({ icon_name: \'system-run\',\n                             icon_type: St.IconType.SYMBOLIC,\n                             style_class: \'system-status-icon\' });\n\n    button.set_child(icon);\n    button.connect(\'button-press-event\', _showHello);\n}\n\nfunction enable() {\n    Main.panel._rightBox.insert_actor(button, 0);\n}\n\nfunction disable() {\n    Main.panel._rightBox.remove_actor(button);\n}\n'}
:__package__: None
:re: <module 're' from '/usr/lib64/python2.7/re.pyc'>
:json: <module 'json' from '/usr/lib64/python2.7/json/__init__.pyc'>
:__doc__: None
:description: 'arbeit2'
:name: 'arbeit2'
:__builtins__: <module '__builtin__' (built-in)>
:__file__: '/usr/bin/gnome-shell-extension-tool'
:args: []
:sys: <module 'sys' (built-in)>
:__name__: '__main__'
:underifier: <_sre.SRE_Pattern object at 0x7fd2c7f78a40>
:extension_path: '/home/Benutzername/.local/share/gnome-shell/extensions/arbeit_@heike'
:socket: <module 'socket' from '/usr/lib64/python2.7/socket.pyc'>
:f: <closed file '/home/Benutzername/.local/share/gnome-shell/extensions/arbeit_@heike/extension.js', mode 'w' at 0x7fd2c7507e40>
:os: <module 'os' from '/usr/lib64/python2.7/os.pyc'>
:optparse: <module 'optparse' from '/usr/lib64/python2.7/optparse.pyc'>
:options: <Values at 0x7fd2c6ecb098: {'create_extension': True}>

comment:
:i tried the following command:
:gnome-shell-extension-tool --create-extension

Comment 1 Elliott Sales de Andrade 2011-11-13 08:45:06 UTC
Package: gnome-shell-3.2.1-2.fc16
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
Just run it and answer the questions.
The line should probably read extension_path instead of extensionjs_path, or something like that.

Comment 2 mynamesha1 2011-11-29 03:05:04 UTC
Package: gnome-shell-3.2.1-2.fc16
Architecture: i686
OS Release: Fedora release 16 (Verne)

Comment
-----
after giving a uuid

Comment 3 Nathan Samson 2011-12-04 23:30:07 UTC
Package: gnome-shell-3.2.1-2.fc16
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
Just creating an extension.

Comment 4 Ruggero 2011-12-25 00:11:24 UTC
Package: gnome-shell-3.2.1-2.fc16
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
try to create new extension with gnome-extension-tool

Comment 5 Fedora Update System 2012-01-18 19:10:47 UTC
mutter-3.2.2-1.fc16,gnome-shell-3.2.2-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/mutter-3.2.2-1.fc16,gnome-shell-3.2.2-1.fc16

Comment 6 Fedora Update System 2012-01-19 01:36:24 UTC
Package mutter-3.2.2-1.fc16, gnome-shell-3.2.2-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mutter-3.2.2-1.fc16 gnome-shell-3.2.2-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0677/mutter-3.2.2-1.fc16,gnome-shell-3.2.2-1.fc16
then log in and leave karma (feedback).

Comment 7 Ruggero 2012-01-19 10:47:36 UTC
(In reply to comment #6)
> Package mutter-3.2.2-1.fc16, gnome-shell-3.2.2-1.fc16:
> * should fix your issue,
> * was pushed to the Fedora 16 testing repository,
> * should be available at your local mirror within two days.
> Update it with:
> # su -c 'yum update --enablerepo=updates-testing mutter-3.2.2-1.fc16
> gnome-shell-3.2.2-1.fc16'
> as soon as you are able to.
> Please go to the following url:
> https://admin.fedoraproject.org/updates/FEDORA-2012-0677/mutter-3.2.2-1.fc16,gnome-shell-3.2.2-1.fc16
> then log in and leave karma (feedback).

I don't know, I've updated the package, and I got the same error:


Created extension in '/home/utente/.local/share/gnome-shell/extensions/e'
Traceback (most recent call last):
  File "/usr/bin/gnome-shell-extension-tool", line 151, in <module>
    subprocess.Popen(['gnome-open', extensionjs_path])
NameError: name 'extensionjs_path' is not defined

Comment 8 Owen Taylor 2012-01-19 16:58:56 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Package mutter-3.2.2-1.fc16, gnome-shell-3.2.2-1.fc16:
> > * should fix your issue,
> > * was pushed to the Fedora 16 testing repository,
> > * should be available at your local mirror within two days.
> > Update it with:
> > # su -c 'yum update --enablerepo=updates-testing mutter-3.2.2-1.fc16
> > gnome-shell-3.2.2-1.fc16'
> > as soon as you are able to.
> > Please go to the following url:
> > https://admin.fedoraproject.org/updates/FEDORA-2012-0677/mutter-3.2.2-1.fc16,gnome-shell-3.2.2-1.fc16
> > then log in and leave karma (feedback).
> 
> I don't know, I've updated the package, and I got the same error:
> 
> 
> Created extension in '/home/utente/.local/share/gnome-shell/extensions/e'
> Traceback (most recent call last):
>   File "/usr/bin/gnome-shell-extension-tool", line 151, in <module>
>     subprocess.Popen(['gnome-open', extensionjs_path])
> NameError: name 'extensionjs_path' is not defined

Can you recheck that you have the updated package? (rpm -q gnome-shell) - for me, line 151 of that file is now:

    extensionjs_path = os.path.join(extension_path, 'extension.js')

Comment 9 Ruggero 2012-01-19 20:19:30 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > Package mutter-3.2.2-1.fc16, gnome-shell-3.2.2-1.fc16:
> > > * should fix your issue,
> > > * was pushed to the Fedora 16 testing repository,
> > > * should be available at your local mirror within two days.
> > > Update it with:
> > > # su -c 'yum update --enablerepo=updates-testing mutter-3.2.2-1.fc16
> > > gnome-shell-3.2.2-1.fc16'
> > > as soon as you are able to.
> > > Please go to the following url:
> > > https://admin.fedoraproject.org/updates/FEDORA-2012-0677/mutter-3.2.2-1.fc16,gnome-shell-3.2.2-1.fc16
> > > then log in and leave karma (feedback).
> > 
> > I don't know, I've updated the package, and I got the same error:
> > 
> > 
> > Created extension in '/home/utente/.local/share/gnome-shell/extensions/e'
> > Traceback (most recent call last):
> >   File "/usr/bin/gnome-shell-extension-tool", line 151, in <module>
> >     subprocess.Popen(['gnome-open', extensionjs_path])
> > NameError: name 'extensionjs_path' is not defined
> 
> Can you recheck that you have the updated package? (rpm -q gnome-shell) - for
> me, line 151 of that file is now:
> 
>     extensionjs_path = os.path.join(extension_path, 'extension.js')

you're right, I copy and paste only one line when updating. Now it's working, thanks

Comment 10 Fedora Update System 2012-01-21 21:48:42 UTC
Package mutter-3.2.2-1.fc16, gnome-shell-3.2.2.1-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mutter-3.2.2-1.fc16 gnome-shell-3.2.2.1-1.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0677/mutter-3.2.2-1.fc16,gnome-shell-3.2.2.1-1.fc16
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2012-01-23 22:04:17 UTC
Package mutter-3.2.2-1.fc16, gnome-shell-3.2.2.1-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mutter-3.2.2-1.fc16 gnome-shell-3.2.2.1-1.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-0677/mutter-3.2.2-1.fc16,gnome-shell-3.2.2.1-1.fc16
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2012-02-07 07:54:12 UTC
mutter-3.2.2-1.fc16, gnome-shell-3.2.2.1-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.