gdesklets-0.36.3-2.fc15: vfs.py:24:<module>:NameError: name 'log' is not defined

Bug #890817 reported by Luya Tshimbalanga
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gDesklets
Fix Committed
Undecided
Joe Sapp
Fedora
Fix Released
Undecided

Bug Description

This bug occurred on Fedora 15 and 16 releasess because gnomevfs is obsoleted by gvfs. Another issue is the log that generated below traceback.

From bugzilla report on Fedora

abrt version: 2.0.3
architecture: i686
cmdline: python /usr/bin/gdesklets start
comment: gdesklets crash on startup
component: gdesklets
executable: /usr/bin/gdesklets
kernel: 2.6.40.3-0.fc15.i686.PAE
os_release: Fedora release 15 (Lovelock)
package: gdesklets-0.36.3-2.fc15
reason: vfs.py:24:<module>:NameError: name 'log' is not defined
time: Sun Sep 18 21:28:52 2011
uid: 500
username: Edward

backtrace:
:vfs.py:24:<module>:NameError: name 'log' is not defined
:
:Traceback (most recent call last):
: File "/usr/bin/gdesklets", line 3, in <module>
: from main import client, DISPLAY, HOME, USERHOME
: File "/usr/lib/gdesklets/main/__init__.py", line 3, in <module>
: import utils
: File "/usr/lib/gdesklets/utils/__init__.py", line 11, in <module>
: from ErrorFormatter import ErrorFormatter
: File "/usr/lib/gdesklets/utils/ErrorFormatter.py", line 4, in <module>
: import vfs
: File "/usr/lib/gdesklets/utils/vfs.py", line 24, in <module>
: log("Using urllib, because gnomevfs isn't available")
:NameError: name 'log' is not defined
:
:Local variables in innermost frame:
:__warningregistry__: None
:__builtins__: {'bytearray': <type 'bytearray'>, 'IndexError': <type
'exceptions.IndexError'>, 'all': <built-in function all>, 'help': Type help()
for interactive help, or help(object) for help about object., 'vars': <built-in
function vars>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'unicode':
<type 'unicode'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
'memoryview': <type 'memoryview'>, 'isinstance': <built-in function
isinstance>, 'copyright': Copyright (c) 2001-2010 Python Software Foundation.
:All Rights Reserved.
:
:Copyright (c) 2000 BeOpen.com.
:All Rights Reserved.
:
:Copyright (c) 1995-2001 Corporation for National Research Initiatives.
:All Rights Reserved.
:
:Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
:All Rights Reserved., 'NameError': <type 'exceptions.NameError'>,
'BytesWarning': <type 'exceptions.BytesWarning'>, 'dict': <type 'dict'>,
'input': <built-in function input>, 'oct': <built-in function oct>, 'bin':
<built-in function bin>, 'SystemExit': <type 'exceptions.SystemExit'>,
'StandardError': <type 'exceptions.StandardError'>, 'format': <built-in
function format>, 'repr': <built-in function repr>, 'sorted': <built-in
function sorted>, 'False': False, 'RuntimeWarning': <type
'exceptions.RuntimeWarning'>, 'list': <type 'list'>, 'iter': <built-in function
iter>, 'reload': <built-in function reload>, 'Warning': <type
'exceptions.Warning'>, '__package__': None, 'round': <built-in function round>,
'dir': <built-in function dir>, 'cmp': <built-in function cmp>, 'set': <type
'set'>, 'bytes': <type 'str'>, 'reduce': <built-in function reduce>, 'intern':
<built-in function intern>, 'issubclass': <built-in function issubclass>,
'Ellipsis': Ellipsis, 'EOFError': <type 'exceptions.EOFError'>, 'locals':
<built-in function locals>, 'BufferError': <type 'exceptions.BufferError'>,
'slice': <type 'slice'>, 'FloatingPointError': <type
'exceptions.FloatingPointError'>, 'sum': <built-in function sum>, 'getattr':
<built-in function getattr>, 'abs': <built-in function abs>, 'exit': Use exit()
or Ctrl-D (i.e. EOF) to exit, 'print': <built-in function print>, 'True': True,
'FutureWarning': <type 'exceptions.FutureWarning'>, 'ImportWarning': <type
'exceptions.ImportWarning'>, 'None': None, 'hash': <built-in function hash>,
'ReferenceError': <type 'exceptions.ReferenceError'>, 'len': <built-in function
len>, 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a
cast of thousands
: for supporting Python development. See www.python.org for more
information., 'frozenset': <type 'frozenset'>, '__name__': '__builtin__',
'ord': <built-in function ord>, 'super': <type 'super'>, 'TypeError': <type
'exceptions.TypeError'>, 'license': See http://www.python.org/2.7/license.html,
'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'UserWarning':
<type 'exceptions.UserWarning'>, 'filter': <built-in function filter>, 'range':
<built-in function range>, 'staticmethod': <type 'staticmethod'>,
'SystemError': <type 'exceptions.SystemError'>, 'BaseException': <type
'exceptions.BaseException'>, 'pow': <built-in function pow>, 'RuntimeError':
<type 'exceptions.RuntimeError'>, 'float': <type 'float'>, 'MemoryError': <type
'exceptions.MemoryError'>, 'StopIteration': <type 'exceptions.StopIteration'>,
'globals': <built-in function globals>, 'divmod': <built-in function divmod>,
'enumerate': <type 'enumerate'>, 'apply': <built-in function apply>,
'LookupError': <type 'exceptions.LookupError'>, 'open': <built-in function
open>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'basestring': <type
'basestring'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'zip':
<built-in function zip>, 'hex': <built-in function hex>, 'long': <type 'long'>,
'next': <built-in function next>, 'ImportError': <type
'exceptions.ImportError'>, 'chr': <built-in function chr>, 'xrange': <type
'xrange'>, 'type': <type 'type'>, '__doc__': "Built-in functions, exceptions,
and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents
`...' in slices.", 'Exception': <type 'exceptions.Exception'>, 'tuple': <type
'tuple'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
'reversed': <type 'reversed'>, 'UnicodeEncodeError': <type
'exceptions.UnicodeEncodeError'>, 'IOError': <type 'exceptions.IOError'>,
'hasattr': <built-in function hasattr>, 'delattr': <built-in function delattr>,
'setattr': <built-in function setattr>, 'raw_input': <built-in function
raw_input>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'compile':
<built-in function compile>, 'ArithmeticError': <type
'exceptions.ArithmeticError'>, 'str': <type 'str'>, 'property': <type
'property'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'int': <type
'int'>, '__import__': <built-in function __import__>, 'KeyError': <type
'exceptions.KeyError'>, 'coerce': <built-in function coerce>,
'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
'file': <type 'file'>, 'EnvironmentError': <type
'exceptions.EnvironmentError'>, 'unichr': <built-in function unichr>, 'id':
<built-in function id>, 'OSError': <type 'exceptions.OSError'>,
'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'min': <built-in
function min>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
'execfile': <built-in function execfile>, 'any': <built-in function any>,
'complex': <type 'complex'>, 'bool': <type 'bool'>, 'ValueError': <type
'exceptions.ValueError'>, 'NotImplemented': NotImplemented, 'map': <built-in
function map>, 'buffer': <type 'buffer'>, 'max': <built-in function max>,
'object': <type 'object'>, 'TabError': <type 'exceptions.TabError'>,
'callable': <built-in function callable>, 'ZeroDivisionError': <type
'exceptions.ZeroDivisionError'>, 'eval': <built-in function eval>, '__debug__':
True, 'IndentationError': <type 'exceptions.IndentationError'>,
'AssertionError': <type 'exceptions.AssertionError'>, 'classmethod': <type
'classmethod'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
'NotImplementedError': <type 'exceptions.NotImplementedError'>,
'AttributeError': <type 'exceptions.AttributeError'>, 'OverflowError': <type
'exceptions.OverflowError'>}
:__file__: None
:urllib: None
:__package__: None
:__name__: None
:__doc__: None
:USE_GNOMEVFS: None

Revision history for this message
In , Edward (edward-redhat-bugs) wrote :
Download full text (7.3 KiB)

abrt version: 2.0.3
architecture: i686
cmdline: python /usr/bin/gdesklets start
comment: gdesklets crash on startup
component: gdesklets
executable: /usr/bin/gdesklets
kernel: 2.6.40.3-0.fc15.i686.PAE
os_release: Fedora release 15 (Lovelock)
package: gdesklets-0.36.3-2.fc15
reason: vfs.py:24:<module>:NameError: name 'log' is not defined
time: Sun Sep 18 21:28:52 2011
uid: 500
username: Edward

backtrace:
:vfs.py:24:<module>:NameError: name 'log' is not defined
:
:Traceback (most recent call last):
: File "/usr/bin/gdesklets", line 3, in <module>
: from main import client, DISPLAY, HOME, USERHOME
: File "/usr/lib/gdesklets/main/__init__.py", line 3, in <module>
: import utils
: File "/usr/lib/gdesklets/utils/__init__.py", line 11, in <module>
: from ErrorFormatter import ErrorFormatter
: File "/usr/lib/gdesklets/utils/ErrorFormatter.py", line 4, in <module>
: import vfs
: File "/usr/lib/gdesklets/utils/vfs.py", line 24, in <module>
: log("Using urllib, because gnomevfs isn't available")
:NameError: name 'log' is not defined
:
:Local variables in innermost frame:
:__warningregistry__: None
:__builtins__: {'bytearray': <type 'bytearray'>, 'IndexError': <type 'exceptions.IndexError'>, 'all': <built-in function all>, 'help': Type help() for interactive help, or help(object) for help about object., 'vars': <built-in function vars>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'unicode': <type 'unicode'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'memoryview': <type 'memoryview'>, 'isinstance': <built-in function isinstance>, 'copyright': Copyright (c) 2001-2010 Python Software Foundation.
:All Rights Reserved.
:
:Copyright (c) 2000 BeOpen.com.
:All Rights Reserved.
:
:Copyright (c) 1995-2001 Corporation for National Research Initiatives.
:All Rights Reserved.
:
:Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
:All Rights Reserved., 'NameError': <type 'exceptions.NameError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'dict': <type 'dict'>, 'input': <built-in function input>, 'oct': <built-in function oct>, 'bin': <built-in function bin>, 'SystemExit': <type 'exceptions.SystemExit'>, 'StandardError': <type 'exceptions.StandardError'>, 'format': <built-in function format>, 'repr': <built-in function repr>, 'sorted': <built-in function sorted>, 'False': False, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'list': <type 'list'>, 'iter': <built-in function iter>, 'reload': <built-in function reload>, 'Warning': <type 'exceptions.Warning'>, '__package__': None, 'round': <built-in function round>, 'dir': <built-in function dir>, 'cmp': <built-in function cmp>, 'set': <type 'set'>, 'bytes': <type 'str'>, 'reduce': <built-in function reduce>, 'intern': <built-in function intern>, 'issubclass': <built-in function issubclass>, 'Ellipsis': Ellipsis, 'EOFError': <type 'exceptions.EOFError'>, 'locals': <built-in function locals>, 'BufferError': <type 'exceptions.BufferError'>, 'slice': <type 'slice'>, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'sum': <built-in function sum>, 'getattr': <bui...

Read more...

Revision history for this message
In , Troy (troy-redhat-bugs) wrote :

Package: gdesklets-0.36.3-2.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
logged in.

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

Hello,
It looks like an issue related to the no longer existed gnomevfs which is now replaced by gvfs. I will work on patch to fix the problem and report it to upstream as well.

Revision history for this message
In , Alexa (alexa-redhat-bugs) wrote :

Package: gdesklets-0.36.3-2.fc15
Architecture: i686
OS Release: Fedora release 16 (Verne)

Comment
-----
Trying to start gdesklets either as regular user, or as root.

Traceback (most recent call last):
  File "/usr/bin/gdesklets", line 3, in <module>
    from main import client, DISPLAY, HOME, USERHOME
  File "/usr/lib/gdesklets/main/__init__.py", line 3, in <module>
    import utils
  File "/usr/lib/gdesklets/utils/__init__.py", line 11, in <module>
    from ErrorFormatter import ErrorFormatter
  File "/usr/lib/gdesklets/utils/ErrorFormatter.py", line 4, in <module>
    import vfs
  File "/usr/lib/gdesklets/utils/vfs.py", line 24, in <module>
    log("Using urllib, because gnomevfs isn't available")
NameError: name 'log' is not defined

Revision history for this message
In , Pavel (pavel-redhat-bugs) wrote :

Package: gdesklets-0.36.3-2.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
1. fresh install on fedora 16 - doesn't contain vfs bindings (gnome-python2-gnomevfs)
2. try to run it
3. due to missing vfs it falls back to urllib and tries to log that while doesn't know log() function either

Installing vfs bindings solves the problem but doesn't fix the cause - unknown log() function

Revision history for this message
In , Mihai (mihai-redhat-bugs) wrote :

Package: gdesklets-0.36.3-2.fc15
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
try to run gdesklets

Revision history for this message
In , Michael (michael-redhat-bugs) wrote :

*** Bug 757763 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

Hello,
For some reason, python will not recognize log as a variable. I have included a patch and build on koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=3560912

Could you test this package? gdesklets should no longer traceback. I will submit the update asap.

Revision history for this message
Luya Tshimbalanga (luya) wrote :

Here is the patch addressing above traceback. For some reason, " log("Using urllib, because gnomevfs isn't available") "inside vfs.py will not be recognized as variable. The workaround is to declare
log = "Using urllib, because gnomevfs isn't available".

gnomevfs should not be used due to its replacement by gvfs[1]. I have tested it on my Fedora distribution which seems to work.

Ref:
[1]http://library.gnome.org/misc/release-notes/2.22/#sect:gvfs-gio

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

*** Bug 756940 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

*** Bug 757662 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

*** Bug 758164 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

*** Bug 759921 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-0.36.3-3.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/gdesklets-0.36.3-3.fc16

Revision history for this message
In , Thies (thies-redhat-bugs) wrote :

(In reply to comment #12)
> gdesklets-0.36.3-3.fc16 has been submitted as an update for Fedora 16.
> https://admin.fedoraproject.org/updates/gdesklets-0.36.3-3.fc16

I tested this version and it works.

Also work gdesklets-slideshow version-0.9-11.fc15 works and
gdesklets-goodweather version 0.31-8.fc16.
But as for fc15 version of goodweather this version only accepts installing one instance.(no multiple weather stations)

With old Gnome2 I used to have multiple weather station information on the panel. (only the current day, without a forecast for more days is OK)

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

Package gdesklets-0.36.3-3.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 gdesklets-0.36.3-3.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16909/gdesklets-0.36.3-3.fc16
then log in and leave karma (feedback).

Revision history for this message
In , Thies (thies-redhat-bugs) wrote :

gdesklets-0.36.3-3.fc16 works fine,
gdesklet-Slideshow 0.9-11.fc15 works fine
gdesklet-goodweather 0.31-8.fc16 work for only one instance, no more than one station at a time.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

gdesklets-0.36.3-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

(In reply to comment #15)
> gdesklets-0.36.3-3.fc16 works fine,
> gdesklet-Slideshow 0.9-11.fc15 works fine
> gdesklet-goodweather 0.31-8.fc16 work for only one instance, no more than one
> station at a time.

I will investigate gdesklets-goodweather on a separate bug report.

Revision history for this message
In , Luya (luya-redhat-bugs) wrote :

*** Bug 766059 has been marked as a duplicate of this bug. ***

Revision history for this message
Joe Sapp (sappj) wrote :

Thanks for the report and patch Luya. I think what you're seeing as "working" is just the try/except functioning as it should. I removed the call to log() since it obviously doesn't work, but I can't import gvfs in a Python shell (can you on Fedora?). It appears to need to be generated by introspection, or whatever the fancy new gtk-3 way of making Python modules is. Since we are planning to start working towards gtk-3 support for 0.36.7, I will just consider this resolved for now.

Changed in gdesklets:
assignee: nobody → Joe Sapp (sappj)
milestone: none → release-of-0.36.4
status: New → Fix Committed
Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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