Launch error message

Bug #1184337 reported by Erik Angelle
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cardapio
New
Undecided
Unassigned

Bug Description

Traceback (most recent call last):
  File "/usr/bin/cardapio", line 198, in <module>
    cardapio_show(centered = True)
  File "/usr/bin/cardapio", line 113, in cardapio_show
    start_cardapio(show = position)
  File "/usr/bin/cardapio", line 45, in start_cardapio
    Cardapio(show = show)
  File "/usr/lib/cardapio/Cardapio.py", line 145, in __init__
    self._create_xdg_folders() # must happen before logging is setup
  File "/usr/lib/cardapio/Cardapio.py", line 634, in _create_xdg_folders
    self._config_folder_path = os.path.join(DesktopEntry.xdg_config_home, 'Cardapio')
AttributeError: 'module' object has no attribute 'xdg_config_home'

Revision history for this message
Ikey Doherty (ikey-doherty) wrote :

Wondering if that could be corrected rather easily or not

Could you try replacing the line:
self._config_folder_path = os.path.join(DesktopEntry.xdg_config_home, 'Cardapio')

with:
self._config_folder_path = os.path.join (os.environ ['HOME'], '.config', 'Cardapio')

in /usr/lib/cardapio/Cardapio.py; just to see if you can get it to start ?

Revision history for this message
Erik Angelle (eangelle) wrote :

Now this:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/awn/extras/awnlib.py", line 1590, in init_start
    applet_class(applet)
  File "/usr/lib/cardapio/CardapioAwnWrapper.py", line 26, in __init__
    cardapio = Cardapio(panel_applet = cardapio_awn_applet)
  File "/usr/lib/cardapio/Cardapio.py", line 145, in __init__
    self._create_xdg_folders() # must happen before logging is setup
  File "/usr/lib/cardapio/Cardapio.py", line 637, in _create_xdg_folders
    os.mkdir(self._config_folder_path)
OSError: [Errno 2] No such file or directory: '/home/[username]/config/Cardapio'

Revision history for this message
Erik Angelle (eangelle) wrote : Re: [Bug 1184337] Re: Launch error message

Traceback (most recent call last):
  File "/usr/bin/cardapio", line 198, in <module>
    cardapio_show(centered = True)
  File "/usr/bin/cardapio", line 113, in cardapio_show
    start_cardapio(show = position)
  File "/usr/bin/cardapio", line 45, in start_cardapio
    Cardapio(show = show)
  File "/usr/lib/cardapio/Cardapio.py", line 183, in __init__
    self._build_ui()
  File "/usr/lib/cardapio/Cardapio.py", line 791, in _build_ui
    self._build_reorderable_sections()
  File "/usr/lib/cardapio/Cardapio.py", line 2216, in
_build_reorderable_sections
    self._build_applications_list()
  File "/usr/lib/cardapio/Cardapio.py", line 2142, in _build_applications_list
    for entry in self._app_tree:
  File "/usr/lib/cardapio/GMenuHelper.py", line 58, in __iter__
    raise StopIteration

________________________________
From: Ikey Doherty <email address hidden>
To: <email address hidden>
Sent: Sun, May 26, 2013 9:05:43 AM
Subject: [Bug 1184337] Re: Launch error message

Wondering if that could be corrected rather easily or not

Could you try replacing the line:
self._config_folder_path = os.path.join(DesktopEntry.xdg_config_home,
'Cardapio')

with:
self._config_folder_path = os.path.join (os.environ ['HOME'], '.config',
'Cardapio')

in /usr/lib/cardapio/Cardapio.py; just to see if you can get it to start
?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1184337

Title:
  Launch error message

Status in Cardapio:
  New

Bug description:
  Traceback (most recent call last):
    File "/usr/bin/cardapio", line 198, in <module>
      cardapio_show(centered = True)
    File "/usr/bin/cardapio", line 113, in cardapio_show
      start_cardapio(show = position)
    File "/usr/bin/cardapio", line 45, in start_cardapio
      Cardapio(show = show)
    File "/usr/lib/cardapio/Cardapio.py", line 145, in __init__
      self._create_xdg_folders() # must happen before logging is setup
    File "/usr/lib/cardapio/Cardapio.py", line 634, in _create_xdg_folders
      self._config_folder_path = os.path.join(DesktopEntry.xdg_config_home,
'Cardapio')
  AttributeError: 'module' object has no attribute 'xdg_config_home'

To manage notifications about this bug go to:
https://bugs.launchpad.net/cardapio/+bug/1184337/+subscriptions

Revision history for this message
Nemes Ioan Sorin (nemes-sorin) wrote :

for all with this problem : 'module' object has no attribute 'xdg_config_home'

open as superuser with text editor you like this file : /usr/lib/cardapio/Cardapio.py
{
...for Linux MInt you can edit the file with this command : sudo pluma /usr/lib/cardapio/Cardapio.py
.. Ubuntu users can use : sudo gedit /usr/lib/cardapio/Cardapio.py
}
After you open the file search for this string "from xdg import DesktopEntry" (at the very beginning of the file).

right below "from xdg import DesktopEntry" add a new entry like this one : from xdg import BaseDirectory

now you should see your new line under the previous one - like this :

from xdg import DesktopEntry
from xdg import BaseDirectory

On the same file you have to replace some strings ( basically the word : DesktopEntry with the word : BaseDirectory ) in few places ...you can use a "Find and Replace" function ...up to your favorite text editor

Therefore you have now to
replace any instance of : DesktopEntry.xdg_config_home with: BaseDirectory.xdg_config_home
replace any instance of : DesktopEntry.xdg_cache_home with: BaseDirectory.xdg_cache_home

...should work.
Reopen Cardapio to check

Revision history for this message
kenn (whatnext) wrote :

I have Ubuntu 13.04, I installed it as awn applet, I tried your suggestion, unfortunately it doesn't work

Revision history for this message
Nemes Ioan Sorin (nemes-sorin) wrote :

Kenn,
I've added my changed file so you can use this file as reference.

this attached file must live in /usr/lib/cardapio/
(rename the old one as Cardapio.py.old)

let's hope it will work ... ;)

Revision history for this message
kenn (whatnext) wrote :

Nemes,
First of all thank you for your reply. I did your what you wrote above. It's the same error. I get the same error. I must note again, mine is Cardapio awn applet.

Revision history for this message
kenn (whatnext) wrote :

I fogot to post traceback, Here is
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/awn/extras/awnlib.py", line 1580, in init_start
    applet_class(applet)
  File "/usr/lib/cardapio/CardapioAwnWrapper.py", line 26, in __init__
    cardapio = Cardapio(panel_applet = cardapio_awn_applet)
  File "/usr/lib/cardapio/Cardapio.py", line 185, in __init__
    self._build_ui()
  File "/usr/lib/cardapio/Cardapio.py", line 796, in _build_ui
    self._fill_places_list()
  File "/usr/lib/cardapio/Cardapio.py", line 1882, in _fill_places_list
    self._fill_bookmarked_places_list()
  File "/usr/lib/cardapio/Cardapio.py", line 1936, in _fill_bookmarked_places_list
    xdg_folders_file_path = os.path.join(DesktopEntry.xdg_config_home, 'user-dirs.dirs')
AttributeError: 'module' object has no attribute 'xdg_config_home'

Revision history for this message
kenn (whatnext) wrote :

Commenting line 1882 fixed it.

Revision history for this message
kenn (whatnext) wrote :

And this bug seems to be related and can shed light on fixing it
.
https://bugs.launchpad.net/ubuntu/+source/gdevilspie/+bug/1161594

Revision history for this message
Nemes Ioan Sorin (nemes-sorin) wrote :
  • Cardapio.py Edit (97.5 KiB, application/octet-stream; name="Cardapio.py")

sorry Kenn,

was my mistake in one line (..1936) - I just forgot to change DesktopEntry
into BaseDirectory
this is why you disabled that line ... 1882 (there is a function which
will populate Cardapio right panel with user bookmarked folders )

you can use the new file I've attached here ...

now everything should work ok - including personal bookmarks

2013/6/11 kenn <email address hidden>

> And this bug seems to be related and can shed light on fixing it
> .
> https://bugs.launchpad.net/ubuntu/+source/gdevilspie/+bug/1161594
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1184337
>
> Title:
> Launch error message
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/cardapio/+bug/1184337/+subscriptions
>

--
Nemes Ioan Sorin

Revision history for this message
Nemes Ioan Sorin (nemes-sorin) wrote :

...corrected Carapio.py attached

Revision history for this message
kenn (whatnext) wrote :

Nemes thank you for all, you fixed it. However I have another problem now, log out, shut down, lock buttons don't work.

Revision history for this message
Nemes Ioan Sorin (nemes-sorin) wrote :

all those things work for me - with the same Cardapio.py file as yours
...check please Cardapio preferences

2013/6/13 kenn <email address hidden>

> Nemes thank you for all, you fixed it. However I have another problem
> now, log out, shut down, lock buttons don't work.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1184337
>
> Title:
> Launch error message
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/cardapio/+bug/1184337/+subscriptions
>

--
Nemes Ioan Sorin

Revision history for this message
Nemes Ioan Sorin (nemes-sorin) wrote :

 .. also I will take a look inside

2013/6/14 SorinN <email address hidden>

> all those things work for me - with the same Cardapio.py file as yours
> ...check please Cardapio preferences
>
>
> 2013/6/13 kenn <email address hidden>
>
>> Nemes thank you for all, you fixed it. However I have another problem
>> now, log out, shut down, lock buttons don't work.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1184337
>>
>> Title:
>> Launch error message
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/cardapio/+bug/1184337/+subscriptions
>>
>
>
>
> --
> Nemes Ioan Sorin
>

--
Nemes Ioan Sorin

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.