CDR-Stats 1.1.0 – Released

Some months ago, we released version 1 of CDR-Stats, to replace the 8 year old Asterisk–Stat. Development of CDR-Stats has continued apace, and we are now pleased to release version 1.1

This release includes a number of new features, including Concurrent Calls, and an interactive Global Statistics feature, as well as ACL login to restrict which CDR a user can see and what he can do. Additionally, CDR can be imported from other systems and CDR-Stats used to analyse the CDR.

We will be releasing shell scripts to assist anyone who wants to install this for themselves on their own PBX and Asterisk installations. Watch the news at www.star2billing.com for more details on these as they are released.

Voip CDR Dashboard

64 Comments

  1. Looks nice. I’ve found sound problems will installing it, nearly in the end while running manager.py dbsync

    Error: no module named messages

    Either with python manager.py shell

    But with python settings.py shell it goes…ok? no error at least.

    I did installed all requirements and followed all the steps one by one. Pretty strange to deal with this problem

  2. Which version of Django do you use ?

  3. Hello

    I’m using:

    Django 1.2.3
    Django Uni_form 0.8.0

    Regards!!

  4. Strange…
    I enter the directory /usr/local/lib/python2.6/dist-packages and there i see:

    Django-1.2.3.egg-info

    I did installed django from the django homepage installer… so it should have put there the correct files…

    How do I know what version I’m using then?

  5. I finally found where the problem was. Django was previously installed in the server with the aptitude application, so it was probably running an older version. I purged it, and reinstalled latest django version and everything went fine

    During the rest of the installation found two strange errors:
    Could not find neither dilla and south modules… In the settings file i comment both and installation finished fine… but why this happened? Where are supposed to be this two modules? Are the crucial for app to work fine?

    Regards!

  6. Dilla is not crucial, but you will need South.

    Yours,
    /Areski

  7. Hello Areski

    For some reason, CDR-Stats server works perfect, but it doesnt work with Apache.

    I’ve copied the entire TARBALL to /usr/share/django_app/cdr_stats

    I’ve copied the exact same configuration of the Installation tutorial into the apache configuration sites-enabled into cdr_stats.conf

    And when I run the web page it says:

    ImportError: Could not import settings ‘cdr_stats.settings’ (Is it on sys.path? Does it have syntax errors?): No module named cdr_stats.settings

    But if I run
    /usr/share/django_apps/cdr_stats/# python manage.py runserver 0.0.0.0:8000

    And go to http://server_ip:8000 CDR Stats works perfect!!!

    What can be the problem?

    Thanks in advance again.

  8. Thanks

    I’m using Ubuntu. I’ve followed the script step by step, and I’ve done exactly the same. This has something to do for sure with apache-django integration.

    Something to do with cdr_stats.settings module. Where is supposed to be this module?

    I’m not very into django at all :(

    Regards

  9. Ok, now I believe I found the problem: The port on the MEDIA URL of my previous install was 8000, I switched to 9000 as the apache server django app and now it worked.

    Thanks by the support by the way. Maybe this can be useful to anyone that doesn’t run FreePBX

    Maybe I can help you out a bit with an auto script for Ubuntu like the one for FreePBX. I’m using asterik bare metal with no graphic configurators.

    Regards

  10. Need help with the install. I have installed everything and all seems well. I followed the instal instructions on the website. But, when I add the conf file to Apache, it comes with errors regarding a directory. Checked it out and I do not have the following directory:
    /usr/share/django_apps/cdr_stats
    I am running CentOS.

    Please help.
    Regards
    AK

  11. AK, if you read the comments you might find the solution to your problem! or use the script of Areski if helps :)

  12. I’m getting this error:

    root@vitto:/usr/src/asterisk/areski-cdr-stats-7d95205/cdr_stats# python manage.py createsuperuser –username=admin –[email protected]
    Traceback (most recent call last):
    File “manage.py”, line 11, in
    execute_manager(settings)
    File “/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py”, line 438, in execute_manager
    utility.execute()
    File “/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py”, line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File “/usr/local/lib/python2.6/dist-packages/django/core/management/base.py”, line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
    File “/usr/local/lib/python2.6/dist-packages/django/core/management/base.py”, line 220, in execute
    output = self.handle(*args, **options)
    File “/usr/local/lib/python2.6/dist-packages/django/contrib/auth/management/commands/createsuperuser.py”, line 72, in handle
    User.objects.get(username=default_username)
    File “/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py”, line 132, in get
    return self.get_query_set().get(*args, **kwargs)
    File “/usr/local/lib/python2.6/dist-packages/django/db/models/query.py”, line 336, in get
    num = len(clone)
    File “/usr/local/lib/python2.6/dist-packages/django/db/models/query.py”, line 81, in __len__
    self._result_cache = list(self.iterator())
    File “/usr/local/lib/python2.6/dist-packages/django/db/models/query.py”, line 269, in iterator
    for row in compiler.results_iter():
    File “/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py”, line 672, in results_iter
    for rows in self.execute_sql(MULTI):
    File “/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py”, line 727, in execute_sql
    cursor.execute(sql, params)
    File “/usr/local/lib/python2.6/dist-packages/django/db/backends/mysql/base.py”, line 86, in execute
    return self.cursor.execute(query, args)
    File “/usr/lib/pymodules/python2.6/MySQLdb/cursors.py”, line 166, in execute
    self.errorhandler(self, exc, value)
    File “/usr/lib/pymodules/python2.6/MySQLdb/connections.py”, line 35, in defaulterrorhandler
    raise errorclass, errorvalue
    django.db.utils.DatabaseError: (1146, “Table ‘asteriskcdr.auth_user’ doesn’t exist”)

    Seems i cant connect to my database. Here is the config:
    DATABASES = {
    ‘default’: {
    ‘ENGINE’: ‘mysql’, # Add ‘postgresql_psycopg2’, ‘postgresql’, ‘mysql’, ‘sqlite3’ or ‘oracle’.
    ‘NAME’: ‘asteriskcdr’, # Or path to database file if using sqlite3.
    ‘USER’: ‘root’, # Not used with sqlite3.
    ‘PASSWORD’: ‘******’, # Not used with sqlite3.
    ‘HOST’: ”, # Set to empty string for localhost. Not used with sqlite3.
    ‘PORT’: ”, # Set to empty string for default. Not used with sqlite3.
    },
    }

    any ideas?

  13. You need to create the tables necessary for the application to work.
    You didn’t run python manager.py syncdb

    Yours,
    /Areski

  14. Hello Areski

    I’ve been using cdr-stats lately and it is definitely a great piece of work for asterisk community.

    But found a little difficulty, that I’m wondering if it could be resolved. In the CDR analysis, I see there are multiple fields like dst, src, etc but there is one missing that is pretty important for myself: dstchannel.

    I’m wondering how its possible to be added. In a .py config file maybe? Any clues to help me out?

    Thanks!

  15. Hello again,

    I could manage to do what I was asking looking a bit into the code, I found it pretty easy:

    In the grid.py just modified the columns and the fields

    In the views.py, just modified the query

    And it worked perfectly. But since this modifications are hard coded its going to be pretty complex to manage all this for future implementations / updates of the software :(

  16. Do you have a separate version for A2billing and not for the Asterisk cdr table? I noticed that you had the disposition codes set for A2billing rather than the Asterisk cdr so i had to change them in order to get the right information. I would like to use the cc_call table instead of having Asterisk writing to an additional table.

  17. No, we intended to build the CDR-Stats for Asterisk not for A2Billing but a new project will come for A2Billing soon.
    Please send us the correction for the disposition codes.

    You can perhaps create a view for the moment on cc_call, just an idea, I haven’t try.

    Yours.
    /Areski

  18. can please tell the default user name password for cdr-stats.
    am using 1.1 version

  19. Hello Areski

    Nice! Project!
    Q = Can i use the install script on Asterisk 1.4?

    Regards

  20. By the way happy new year ….blessings!! Every one

  21. Yes, you can :-)

    Happy New Year to all :-)

  22. Thanks for the reply will try it out and post you the results.

  23. HI Areski when the script finished (the script informed to open “http: :9000 ) running it displayed the following error. Can you assist.

    Thanks

    Mod_python error: “PythonHandler django.core.handlers.modpython” Traceback (most recent call last): File “/usr/lib/python2.4/site-packages/mod_python/apache.py”, line 299, in HandlerDispatch result = object(req) File “/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py”, line 228, in handler return ModPythonHandler()(req) File “/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py”, line 191, in __call__ self.load_middleware() File “/usr/lib/python2.4/site-packages/django/core/handlers/base.py”, line 40, in load_middleware mod = import_module(mw_module) File “/usr/lib/python2.4/site-packages/django/utils/importlib.py”, line 35, in import_module __import__(name) File “/usr/share/django_app/cdr_stats/cdr/colorsql.py”, line 2, in ? from django.db import connection File “/usr/lib/python2.4/site-packages/django/db/__init__.py”, line 77, in ? connection = connections[DEFAULT_DB_ALIAS] File “/usr/lib/python2.4/site-packages/django/db/utils.py”, line 91, in __getitem__ backend = load_backend(db[‘ENGINE’]) File “/usr/lib/python2.4/site-packages/django/db/utils.py”, line 32, in load_backend return import_module(‘.base’, backend_name) File “/usr/lib/python2.4/site-packages/django/utils/importlib.py”, line 35, in import_module __import__(name) File “/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py”, line 11, in ? import MySQLdb as Database File “/usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-i686.egg/MySQLdb/__init__.py”, line 19, in ? File “/usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-i686.egg/_mysql.py”, line 7, in ? File “/usr/lib/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-i686.egg/_mysql.py”, line 4, in __bootstrap__ File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 799, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 1229, in get_resource_filename return self._extract_resource(manager, zip_path) File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 1249, in _extract_resource real_path = manager.get_cache_path( File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 880, in get_cache_path self.extraction_error() File “/usr/lib/python2.4/site-packages/pkg_resources.py”, line 846, in extraction_error raise err ExtractionError: Can’t extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: ‘/root/.python-eggs’ The Python egg cache directory is currently set to: /root/.python-eggs Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory.

  24. HI Areski when the script finished (the script informed to open “http: :9000 ) running it displayed the following error. Can you assist.

    Mod_python error: “PythonHandler django.core.handlers.modpython”

    Traceback (most recent call last):

    File “/usr/lib/python2.4/site-packages/mod_python/apache.py”, line 299, in HandlerDispatch
    result = object(req)

    File “/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py”, line 228, in handler
    return ModPythonHandler()(req)

    File “/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py”, line 191, in __call__
    self.load_middleware()

    File “/usr/lib/python2.4/site-packages/django/core/handlers/base.py”, line 40, in load_middleware
    mod = import_module(mw_module)

    File “/usr/lib/python2.4/site-packages/django/utils/importlib.py”, line 35, in import_module
    __import__(name)

    File “/usr/share/django_app/cdr_stats/cdr/colorsql.py”, line 2, in ?
    from django.db import connection

    File “/usr/lib/python2.4/site-packages/django/db/__init__.py”, line 77, in ?
    connection = connections[DEFAULT_DB_ALIAS]

    File “/usr/lib/python2.4/site-packages/django/db/utils.py”, line 91, in __getitem__
    backend = load_backend(db[‘ENGINE’])

    File “/usr/lib/python2.4/site-packages/django/db/utils.py”, line 32, in load_backend
    return import_module(‘.base’, backend_name)

    File “/usr/lib/python2.4/site-packages/django/utils/importlib.py”, line 35, in import_module
    __import__(name)

    File “/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py”, line 23, in ?
    raise ImproperlyConfigured(“MySQLdb-1.2.1p2 or newer is required; you have %s” % Database.__version__)

    ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1

    regards,

  25. Hello all,

    Thank to you guys to making this happen. I’ve been trying to get cdr-stats up and running but am facing to some problems. here there are:
    – When trying to install the database, this errors occur:
    [mt@srv1 cdr_stats]# python manage.py syncdb
    Traceback (most recent call last):
    File “manage.py”, line 11, in ?
    execute_manager(settings)
    File “/usr/lib/python2.4/site-packages/django/core/management/__init__.py”, line 438, in execute_manager
    utility.execute()
    File “/usr/lib/python2.4/site-packages/django/core/management/__init__.py”, line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File “/usr/lib/python2.4/site-packages/django/core/management/base.py”, line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
    File “/usr/lib/python2.4/site-packages/django/core/management/base.py”, line 219, in execute
    self.validate()
    File “/usr/lib/python2.4/site-packages/django/core/management/base.py”, line 249, in validate
    num_errors = get_validation_errors(s, app)
    File “/usr/lib/python2.4/site-packages/django/core/management/validation.py”, line 86, in get_validation_errors
    connection.validation.validate_field(e, opts, f)
    File “/usr/lib/python2.4/site-packages/django/db/backends/mysql/validation.py”, line 14, in validate_field
    db_version = self.connection.get_server_version()
    File “/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py”, line 313, in get_server_version
    self.cursor()
    File “/usr/lib/python2.4/site-packages/django/db/backends/__init__.py”, line 75, in cursor
    cursor = self._cursor()
    File “/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py”, line 301, in _cursor
    cursor = CursorWrapper(self.connection.cursor())
    File “/usr/lib64/python2.4/site-packages/MySQL_python-1.2.3-py2.4-linux-x86_64.egg/MySQLdb/connections.py”, line 243, in cursor
    AttributeError: ‘Connection’ object has no attribute ‘cursorclass’

    Am really a newbie with python. Please can you guys help me sort this out ?

    Thanks

    Regards!

    M.T.

  26. I’m not familiar with this error.
    I will contact you by mail and see if we can find something, it’s still a young application.

    Yours,
    /Areski

  27. The dependency seems to not be completed.
    ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1

    is this what you get installing with : easy_install MySQL-python

    Yours,
    /Areski

  28. App itself works great, thanks for another great product. I was wondering if you might be able to point me in the right direction towards customizing the database structure a bit. I use the adaptive back-end and would like to be able to use CDR-STATS with my setup: I use the standard field set in addition to another eight custom fields. I spent a day toying with the views, grid, importcdr, updatecdr and 0001_initial files but did not get very far. The code seems intolerant to changes, and I don’t speak Python. It also seems like there may be some restraints in South that could present a challenge as well. If you could just tell me which specific files I would need to change, I could probably figure it out from there. One more question: One of my custom fields is a URL to file recordings, could I use dilla to add the href to an http:// string?

    Thanks in advance for any info you can provide, I’ll link back to the writeup for my custom setup if I can get this working.

    Regards,
    Doug

  29. Hi, Areski. I found CDR-stats very useful for me, so I started setup it. I have got the step ‘Test with : python manage.py runserver 0.0.0.0:8000’ and server is starting ok. But when I trying http://my_server:8000/ I’ve got the error page:

    Traceback (most recent call last):
    File “/usr/lib/python2.4/site-packages/django/core/servers/basehttp.py”, line 280, in run
    self.result = application(self.environ, self.start_response)
    File “/usr/lib/python2.4/site-packages/django/core/servers/basehttp.py”, line 674, in __call__
    return self.application(environ, start_response)
    File “/usr/lib/python2.4/site-packages/django/core/handlers/wsgi.py”, line 241, in __call__
    response = self.get_response(request)
    File “/usr/lib/python2.4/site-packages/django/core/handlers/base.py”, line 141, in get_response
    return self.handle_uncaught_exception(request, resolver, sys.exc_info())
    File “/usr/lib/python2.4/site-packages/django/core/handlers/base.py”, line 176, in handle_uncaught_exception
    if resolver.urlconf_module is None:
    File “/usr/lib/python2.4/site-packages/django/core/urlresolvers.py”, line 239, in _get_urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
    File “/usr/lib/python2.4/site-packages/django/utils/importlib.py”, line 35, in import_module
    __import__(name)

    ImportError: No module named cdr_stats.urls
    I have CentOS release 5.5 (Final), python-2.4.3, django-1.2.4 and CDR-stats 1.1.0

  30. try to make sure the directory where you copy the file is called cdr_stats

  31. You should not worry about South or Dilla, South will help to migrate your data model to the new model.
    You might need to learn some django to feel confident changing the application, the whole development is based on this python framework and make it easy for other django dev to update it.

    Yours,
    /Areski

  32. Hi Areski congrats for such a product. I’ve installed CDR-Stats with ease only i can’t integrate it with apache. I start it with python manage.py runserver 0.0.0.0:8000. Admin section works fine however user section don’t display correctly and very slowly some text displays without css. How can i fix that ?

  33. Hi Adolphe,

    You might have missed a step in the installation,

    In the directory resources you need to create a symbolic links.

    Update Admin Media path :
    ————————–

    cd resources
    #ln -s /usr/lib/pymodules/python2.4/django/contrib/admin/media/ admin
    #ln -s /usr/lib/python2.4/site-packages/django/contrib/admin/media/ admin
    ln -s /usr/local/lib/python2.6/dist-packages/django/contrib/admin/media/ admin
    On Debian :
    ln -s /usr/lib/python2.5/site-packages/django/contrib/admin/media/ admin

    edit settings.py :
    ADMIN_MEDIA_PREFIX = ‘/resources/admin/’

  34. Don’t use runserver, that just for testing.
    it’s suppose to be pretty fast but we haven’t tested with huge amount of CDR yet

  35. Hello,

    Thanks for nice piece of software. However i’m facing some problems regarding the admin site. For most of them i receive error 500. (customer, company, etc). i can not add users or change existing ones. I also tried 1.2 from star2..and it is the same. Is this something with format of cdr table for mysql where you are using different type of fields then asterisk (account, you use integer but it is string, the same apply to disposition which is written only when using odbc but not when using directly sql add on module)?

    Thanks and Regards,

    Daniel

  36. Hello Areski,

    Thanks for this app.

    I installed it on debian squeeze. Everything is OK but it is very very very slow. The CDR table is empty.

    Any idea ?

    Regards,
    Martin

  37. More details :

    When I give a look to the source code of the web page, it seems to be fully downloaded but the browser displays a blank screen

    Regards,
    Martin

  38. Hi Martin,
    Please contact me directly, I could have a look at your install if you like.
    Yours,
    /Areski

  39. Hi Areski.

    I`m trying install latest cdr-stats version, but when I do login, this error is printed:

    Mod_python error: “PythonHandler django.core.handlers.modpython”

    Traceback (most recent call last):

    File “/usr/lib/python2.4/site-packages/mod_python/apache.py”, line 299, in HandlerDispatch
    result = object(req)

    File “/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py”, line 228, in handler
    return ModPythonHandler()(req)

    File “/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py”, line 191, in __call__
    self.load_middleware()

    File “/usr/lib/python2.4/site-packages/django/core/handlers/base.py”, line 40, in load_middleware
    mod = import_module(mw_module)

    File “/usr/lib/python2.4/site-packages/django/utils/importlib.py”, line 35, in import_module
    __import__(name)

    File “/usr/src/cdr-stats/cdr_stats/cdr/colorsql.py”, line 2, in ?
    from django.db import connection

    File “/usr/lib/python2.4/site-packages/django/db/__init__.py”, line 77, in ?
    connection = connections[DEFAULT_DB_ALIAS]

    File “/usr/lib/python2.4/site-packages/django/db/utils.py”, line 91, in __getitem__
    backend = load_backend(db[‘ENGINE’])

    File “/usr/lib/python2.4/site-packages/django/db/utils.py”, line 49, in load_backend
    raise ImproperlyConfigured(error_msg)

    ImproperlyConfigured: ‘django.db.backends.mysql’ isn’t an available database backend.
    Try using django.db.backends.XXX, where XXX is one of:
    ‘dummy’, ‘mysql’, ‘oracle’, ‘postgresql’, ‘postgresql_psycopg2’, ‘sqlite3’
    Error was: cannot import name utils

    What can I do?

  40. You might need to install MySQL-python

  41. i have installed MySQL-python but the same error :

    Mod_python error: “PythonHandler django.core.handlers.modpython”

    any idea?

  42. I’m getting error 500 when trying to do almost anything in admin section? anyone else having this problem?

  43. I’m also getting this error when clicking on “Search CDR”:

    MOD_PYTHON ERROR

    ProcessId: 26007
    Interpreter: ‘XXXX’

    ServerName: ‘XXXX’
    DocumentRoot: ‘/usr/share/django_app/cdr_stats/’

    URI: ‘/show_cdr/’
    Location: ‘/’
    Directory: None
    Filename: ‘/usr/share/django_app/cdr_stats/show_cdr’
    PathInfo: ‘/’

    Phase: ‘PythonHandler’
    Handler: ‘django.core.handlers.modpython’

    Traceback (most recent call last):

    File “/usr/lib/python2.6/site-packages/mod_python/importer.py”, line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

    File “/usr/lib/python2.6/site-packages/mod_python/importer.py”, line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

    File “/usr/lib/python2.6/site-packages/mod_python/importer.py”, line 1128, in _execute_target
    result = object(arg)

    File “/usr/lib/python2.6/site-packages/django/core/handlers/modpython.py”, line 228, in handler
    return ModPythonHandler()(req)

    File “/usr/lib/python2.6/site-packages/django/core/handlers/modpython.py”, line 205, in __call__
    response = middleware_method(request, response)

    File “/usr/lib/python2.6/site-packages/django/contrib/sessions/middleware.py”, line 36, in process_response
    request.session.save()

    File “/usr/lib/python2.6/site-packages/django/contrib/sessions/backends/db.py”, line 63, in save
    obj.save(force_insert=must_create, using=using)

    File “/usr/lib/python2.6/site-packages/django/db/models/base.py”, line 458, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)

    File “/usr/lib/python2.6/site-packages/django/db/models/base.py”, line 524, in save_base
    rows = manager.using(using).filter(pk=pk_val)._update(values)

    File “/usr/lib/python2.6/site-packages/django/db/models/query.py”, line 502, in _update
    return query.get_compiler(self.db).execute_sql(None)

    File “/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py”, line 866, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)

    File “/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py”, line 732, in execute_sql
    cursor.execute(sql, params)

    File “/usr/lib/python2.6/site-packages/django/db/backends/mysql/base.py”, line 86, in execute
    return self.cursor.execute(query, args)

    File “build/bdist.linux-i686/egg/MySQLdb/cursors.py”, line 174, in execute
    self.errorhandler(self, exc, value)

    File “build/bdist.linux-i686/egg/MySQLdb/connections.py”, line 36, in defaulterrorhandler
    raise errorclass, errorvalue

    OperationalError: (1153, “Got a packet bigger than ‘max_allowed_packet’ bytes”)