The developers' tutorials need an update

Bug #410104 reported by max.ott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Moovida
Fix Released
High
Florian Boucault

Bug Description

I followed the Weather plugin tutorial and everything seems to be fine, but when I start it, it get the following error:

$ python elisa-core/elisa.py elisa_weather.conf
/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/internet/_sslverify.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import itertools, md5
Error 'PluginRegistry' object has no attribute 'info'

I did follow the instructions on settin gup a debug environment on Ubuntu and ran the setup commands

$ ~/src/pigment/pigment/misc/pgm-uninstalled
$ export PYTHONPATH=$PWD/elisa-core:$PWD/elisa-plugins:$PYTHONPATH

I'm new to Elisa, so I'm not really sure where I would start getting to the bottom of this.

Revision history for this message
Philippe Normand (philn) wrote : Re: [Bug 410104] [NEW] Running weather plugin results in 'PluginRegistry' object has no attribute 'info'

There's no elisa-core/elisa.py anymore.
Those docs require an update since some things changed few months ago,
like... the project name ;=)

When developing you should use the latest version of Moovida (either the
release tarballs or the bzr branch which is safe-to-use as well).

Le vendredi 07 août 2009 à 00:06 +0000, max.ott a écrit :
> Public bug reported:
>
> I followed the Weather plugin tutorial and everything seems to be fine,
> but when I start it, it get the following error:
>
> $ python elisa-core/elisa.py elisa_weather.conf
> /usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-linux-i686.egg/twisted/internet/_sslverify.py:5: DeprecationWarning: the md5 module is deprecated; use hashlib instead
> import itertools, md5
> Error 'PluginRegistry' object has no attribute 'info'
>
> I did follow the instructions on settin gup a debug environment on
> Ubuntu and ran the setup commands
>
> $ ~/src/pigment/pigment/misc/pgm-uninstalled
> $ export PYTHONPATH=$PWD/elisa-core:$PWD/elisa-plugins:$PYTHONPATH
>
> I'm new to Elisa, so I'm not really sure where I would start getting to
> the bottom of this.
>
> ** Affects: elisa
> Importance: Undecided
> Status: New
>

Olivier Tilloy (osomon)
summary: - Running weather plugin results in 'PluginRegistry' object has no
- attribute 'info'
+ The developers' tutorials need an update
Changed in elisa:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
max.ott (max-ott) wrote :

On 07/08/2009, at 6:38 PM, Philippe Normand wrote:

> When developing you should use the latest version of Moovida (either
> the
> release tarballs or the bzr branch which is safe-to-use as well).

Thanks for your reply, but this is exactly what I'm doing - following
the instructions on your web site:

% bzr branch lp:elisa
Was I supposed to grab another branch, from another project?
Where do I find up-to-date information on getting started.
Thanks,
-max

Revision history for this message
Philippe Normand (philn) wrote :

Le vendredi 07 août 2009 à 12:33 +0000, max.ott a écrit :
> On 07/08/2009, at 6:38 PM, Philippe Normand wrote:
>
> > When developing you should use the latest version of Moovida (either
> > the
> > release tarballs or the bzr branch which is safe-to-use as well).
>
> Thanks for your reply, but this is exactly what I'm doing - following
> the instructions on your web site:
>
> % bzr branch lp:elisa
> Was I supposed to grab another branch, from another project?
> Where do I find up-to-date information on getting started.
> Thanks,
> -max
>

The lp:elisa branch is fine. So next step is to uninstall the
system-wide elisa/moovida packages. The important thing is to check that
when from a Python shell you import "elisa", the local (from your
branch) package is picked up:

python -c "import elisa; print elisa"

should print the path of the elisa package.

Revision history for this message
max.ott (max-ott) wrote :

On 10/08/2009, at 7:18 PM, Philippe Normand wrote:

> python -c "import elisa; print elisa"

I removed the package, and reinstalled everything.

$ python -c "import elisa; print elisa"
<module 'elisa' from '/home/max/src/elisa/elisa/elisa-plugins/elisa/
__init__.pyc'>

But when I run the weather plugin:

$ python elisa-core/bin/moovida weather.config

.....

Traceback (most recent call last):
   File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
linux-i686.egg/twisted/internet/gtk2reactor.py", line 225, in simulate
     self.runUntilCurrent()
   File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
linux-i686.egg/twisted/internet/base.py", line 757, in runUntilCurrent
     call.func(*call.args, **call.kw)
   File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
linux-i686.egg/twisted/internet/task.py", line 251, in _tick
     result = iterator.next()
   File "/home/max/src/elisa/elisa/elisa-core/elisa/core/manager.py",
line 101, in load_components_iter
     dfr = plugin_registry.create_component(component_name)
--- <exception caught here> ---
   File "/home/max/src/elisa/elisa/elisa-core/elisa/core/
plugin_registry.py", line 1103, in create_component
     component_class = reflect.namedAny('%s.%s' % (module, klass))
   File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
linux-i686.egg/twisted/python/reflect.py", line 456, in namedAny
     topLevelPackage = _importAndCheckStack(trialname)
   File "/home/max/.moovida/plugins/elisa_plugin_ipod-0.2.egg/elisa/
plugins/ipod/ipod_resource.py", line 28, in <module>

exceptions.ImportError: No module named gpod

....

Ultimately, I get the full Moovida screen. I just want the weather
GUI, nothing else. I thought that's what I get for with a config file,
such as:

[general]
resource_providers = ['weather.report_provider:WeatherReportProvider']
frontends = ['weather_frontend']

[weather_frontend]
frontend = 'pigment.pigment_frontend:PigmentFrontend'
controller_path = '/elisa/weather'

[weather.weather_controller:WeatherController]
station = 'LEBL'

Maybe the saner question to ask at this stage. Does it even make sense
at this stage for somebody outside the core development team to try to
use this framework beside just running the app and watch movies? Don't
get me wrong, I have written plenty of software which only the very
brave want to build on top. But I'm getting very frustrated of seeing
all this error messages and having no idea what they mean nor where to
start.

All I want to do at this stage is re-creating the tutorial.

Cheers,

-max

Revision history for this message
Philippe Normand (philn) wrote :

Try:

python elisa-core/bin/moovida -c weather.config

And to answer your question, the current Moovida framework was designed
to allow multiple frontends but the fact is that no one (to my
knowledge) uses that aspect of the architecture. We basically always use
the pigment frontend...

Anyway, feel free to join us on #elisa @ irc.freenode.net and ask us
more questions. :)

Philippe

Le jeudi 27 août 2009 à 12:22 +0000, max.ott a écrit :
> On 10/08/2009, at 7:18 PM, Philippe Normand wrote:
>
> > python -c "import elisa; print elisa"
>
> I removed the package, and reinstalled everything.
>
> $ python -c "import elisa; print elisa"
> <module 'elisa' from '/home/max/src/elisa/elisa/elisa-plugins/elisa/
> __init__.pyc'>
>
>
> But when I run the weather plugin:
>
> $ python elisa-core/bin/moovida weather.config
>
> .....
>
>
> Traceback (most recent call last):
> File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
> linux-i686.egg/twisted/internet/gtk2reactor.py", line 225, in simulate
> self.runUntilCurrent()
> File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
> linux-i686.egg/twisted/internet/base.py", line 757, in runUntilCurrent
> call.func(*call.args, **call.kw)
> File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
> linux-i686.egg/twisted/internet/task.py", line 251, in _tick
> result = iterator.next()
> File "/home/max/src/elisa/elisa/elisa-core/elisa/core/manager.py",
> line 101, in load_components_iter
> dfr = plugin_registry.create_component(component_name)
> --- <exception caught here> ---
> File "/home/max/src/elisa/elisa/elisa-core/elisa/core/
> plugin_registry.py", line 1103, in create_component
> component_class = reflect.namedAny('%s.%s' % (module, klass))
> File "/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0-py2.6-
> linux-i686.egg/twisted/python/reflect.py", line 456, in namedAny
> topLevelPackage = _importAndCheckStack(trialname)
> File "/home/max/.moovida/plugins/elisa_plugin_ipod-0.2.egg/elisa/
> plugins/ipod/ipod_resource.py", line 28, in <module>
>
> exceptions.ImportError: No module named gpod
>
> ....
>
> Ultimately, I get the full Moovida screen. I just want the weather
> GUI, nothing else. I thought that's what I get for with a config file,
> such as:
>
> [general]
> resource_providers = ['weather.report_provider:WeatherReportProvider']
> frontends = ['weather_frontend']
>
> [weather_frontend]
> frontend = 'pigment.pigment_frontend:PigmentFrontend'
> controller_path = '/elisa/weather'
>
> [weather.weather_controller:WeatherController]
> station = 'LEBL'
>
>
> Maybe the saner question to ask at this stage. Does it even make sense
> at this stage for somebody outside the core development team to try to
> use this framework beside just running the app and watch movies? Don't
> get me wrong, I have written plenty of software which only the very
> brave want to build on top. But I'm getting very frustrated of seeing
> all this error messages and having no idea what they mean nor where to
> start.
>
> All I want to do at this stage is re-creating the tutorial.
>
> Cheers,
>
> -max
>

Changed in elisa:
assignee: nobody → Kaleo (fboucault)
milestone: none → 1.0.8
status: Confirmed → In Progress
Revision history for this message
Florian Boucault (fboucault) wrote :

Work is in progress at lp:~elisa-developers/elisa/documentation branch to create a unique reference documentation 'elisa-core/docs/developers_guide.rst'

Work is in progress to create an example, inline explained plugin at lp:~uriboni/elisa/plugin-skeleton

Changed in elisa:
status: In Progress → Fix Committed
Olivier Tilloy (osomon)
Changed in moovida:
status: Fix Committed → Fix Released
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.