Django XMMS2: 'module' object has no attribute 'XMMS'

I just started to use Python so the following might be a really REALLY dumb question but I searched the web for a long time and didn't find anything.

I'm trying to use the XMMS2 client from a Django View. Here is what I have in my

import xmmsclient
import os
import sys

def list(request):
    xmms = xmmsclient.XMMS("tutorial1")
    result = xmms.playlist_list_entries()

And here is the error I get:

AttributeError at /xmms2/list/
'module' object has no attribute 'XMMS'

And the line in question is this:

 xmms = xmmsclient.XMMS("tutorial1") 

The view works fine if I remove all the code and replace it with (for example):

return HttpResponse("list")

I first thought there was a problem with the xmmsclient library but it works fine when I run this xmms2-tutorial example

So I guess there is some sort of incompatibility between Django and xmmsclient but I really don't have a clue.

I'm running Ubuntu 12.04, Python 2.7.3, Django 1.4.1 and XMMS2 0.8

Any help will be really appreciated!


The problem was a name conflict. My Django app name was "xmmsclient".

So when I did


I was referring to my app module, not the one from the XMMS2 client library.

Thanks a lot to Erik Massop from the xmms2-devel list!

Need Your Help

Is Google Chrome effectively buggy in its handling of desktop DPI?

web-applications browser google-chrome

They appear to assume that "web designers assume a fixed 72DPI" (or something specific anyway). But desktop DPI usually depends on screen physical size.

Adding data at the specific position of Listview in android

android android-listview notifydatasetchanged

I have a listview and I have to add two more element in listview. I have to add notifyDataSetChanged() . but not sure how to do it.