namespace collision with Python packages

67 views
Skip to first unread message

demitri

unread,
Mar 15, 2012, 3:33:47 PM3/15/12
to turbo...@googlegroups.com
Hi,

I recently performed an upgrade from Ubuntu 11.04 to 11.10, and one of my TurboGears applications broke. I've identified the problem, but I don't know the solution nor how things were working before.

This is one of the errors I get:

    from repoze.what.plugins.quickstart import setup_sql_auth
ImportError: No module named quickstart

I have these packages installed.

repoze.what-1.0.8-py2.6.egg/
repoze.what.plugins.sql-1.0-py2.6.egg/
repoze.what_pylons-1.0-py2.6.egg/
repoze.what_quickstart-1.0.9-py2.6.egg/

I take it that Python was looking in repose.what for repoze.what.plugins.quickstart, but it's not there. I moved "repoze.what_quickstart-1.0.9-py2.6.egg" above "repoze.what-1.0.8-py2.6.egg" and it found repoze.what.plugins.quickstart, but then it wouldn't find anything in repoze.what.

It seems that these two separate packages are claiming - and superseding the other's - Python namespace. That these packages were written this way seems to suggest that they shouldn't break like this. Can someone explain a) how this is normally resolved in Python and b) what might have changed in the upgrade to break this?

The "quick fix" was to take the code out of repose.what.plugins.quickstart and put it in the appropriate place in the repose.what egg but, while it worked, is clearly a hack.

Cheers,
Demitri

demitri

unread,
Mar 15, 2012, 3:34:57 PM3/15/12
to turbo...@googlegroups.com
Oh, I should also mention I had to do the same thing with repoze.who.

Michael Pedersen

unread,
Mar 22, 2012, 12:13:37 AM3/22/12
to turbo...@googlegroups.com
One thing you don't tell us here: Is this in a virtualenv?

I strongly suspect this is more of a conflict between system-wide packages and a local virtualenv package, which is why I ask.

On Thu, Mar 15, 2012 at 3:34 PM, demitri <besw...@gmail.com> wrote:
Oh, I should also mention I had to do the same thing with repoze.who.

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To view this discussion on the web visit https://groups.google.com/d/msg/turbogears/-/tJ3hEem_L1YJ.

To post to this group, send email to turbo...@googlegroups.com.
To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.



--
Michael J. Pedersen
My Online Resume: http://www.icelus.org/ -- Google+ http://plus.ly/pedersen
Google Talk: m.ped...@icelus.org -- Twitter: pedersentg

Reply all
Reply to author
Forward
0 new messages