linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.45k stars 733 forks source link

cinnamon: cinnamon-desktop-editor.py:109:pick_icon:TypeError: Argument 0 does not allow None as a value #4211

Closed leigh123linux closed 9 years ago

leigh123linux commented 9 years ago

Forwarded from https://bugzilla.redhat.com/show_bug.cgi?id=1156479

Description of problem:
I created a link for a script and added it to the panel and when i wanted to add an icon

Version-Release number of selected component:
cinnamon-2.6.2-1.fc22

Additional info:
reporter:       libreport-2.5.1
cmdline:        python2 /usr/lib/cinnamon-desktop-editor/cinnamon-desktop-editor.py -mcinnamon-launcher -fcinnamon-custom-launcher-1.desktop panel-launchers@cinnamon.org 2 /home/mbenhamd/.cinnamon/configs/panel-launchers@cinnamon.org/2.json
executable:     /usr/lib/cinnamon-desktop-editor/cinnamon-desktop-editor.py
kernel:         4.0.4-301.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
cinnamon-desktop-editor.py:109:pick_icon:TypeError: Argument 0 does not allow None as a value

Traceback (most recent call last):
  File "/usr/lib/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 109, in pick_icon
    if GLib.path_is_absolute(fn):
TypeError: Argument 0 does not allow None as a value

Local variables in innermost frame:
button: <Button object at 0x7f78fc19f8c0 (GtkButton at 0x1638560)>
chooser: <FileChooserDialog object at 0x7f78fc19faa0 (GtkFileChooserDialog at 0x17542a0)>
self: <__main__.IconPicker object at 0x7f78fc1a6150>
fn: None
jlu5 commented 9 years ago

Does GLolol@32c9e9afd0c5e545ab670567883eda730b5a87cc fix the issue?

leigh123linux commented 9 years ago

@GLolol

Sorry it doesn't fix the issue

Traceback (most recent call last):
  File "/usr/lib/cinnamon-desktop-editor/cinnamon-desktop-editor.py", line 113, in pick_icon
    icon_info = theme.lookup_icon(fn, 64, 0)
TypeError: Argument 1 does not allow None as a value
ghost commented 9 years ago

Well i resolve a problem like this 2 days ago, but is for other thing. There are more problems, like if the application start without an icon can not be change the icon and some other more. I currently not remember all problems that i found, but is possible will not be all applicable to the cinnamon behavior, as i found this testing the class to make other solution.

https://github.com/lestcape/Cinnamon-Settings-Editor/blob/master/cinnamon-settings-editor/src/cinnamon_settings_editor.py#L66-L75

leigh123linux commented 9 years ago

@mtwebster

Thank you