Ask Your Question
1

Status of Zendesk import

asked 2013-05-21 16:30:28 -0500

kporangehat gravatar image

Using the latest askbot-devel from github, I'm trying to import data from our Zendesk account. I followed the instructions in the documentation but it looks like the import function is broken. We have quite few users and it reports (before the traceback) that 0 were imported. Then it barfs.

Has this been kept up to date or is it likely in need of some love?

$ python manage.py import_zendesk /home/ec2-user/downloads/zendesk_import/zendesk.tgz 
/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/conf/__init__.py:75: DeprecationWarning: The ADMIN_MEDIA_PREFIX setting has been removed; use STATIC_URL instead.
  "use STATIC_URL instead.", DeprecationWarning)
/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/core/cache/__init__.py:82: DeprecationWarning: settings.CACHE_* is deprecated; use settings.CACHES instead.
  DeprecationWarning
Importing user accounts: 0 users added
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/core/management/__init__.py", line 459, in execute_manager
    utility.execute()
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/home/ec2-user/downloads/shotgun-askbot/askbot/importers/zendesk/management/commands/import_zendesk.py", line 160, in handle
    self.import_users()
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/db/transaction.py", line 224, in inner
    return func(*args, **kwargs)
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/db/transaction.py", line 218, in __exit__
    self.exiting(exc_value, self.using)
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/db/transaction.py", line 303, in exiting
    leave_transaction_management(using=using)
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/db/transaction.py", line 67, in leave_transaction_management
    connection.leave_transaction_management()
  File "/home/ec2-user/.virtualenvs/askbot/lib/python2.6/site-packages/django/db/backends/__init__.py", line 130, in leave_transaction_management
    raise TransactionManagementError("Transaction managed block ended with "
django.db.transaction.TransactionManagementError: Transaction managed block ended with pending COMMIT/ROLLBACK
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-05-21 17:23:47 -0500

Evgeny gravatar image

Possibly this got out of hand. This may be a simple issue or due to change in the data schema. Could you send me a sample of dump data?

edit flag offensive delete link more

Comments

I can't send the schema unfortunately because of internal security reasons. But I'm going to take a hack at getting this working myself. If I get somewhere I will submit a pull request and update my findings here. Thanks.

kporangehat gravatar image kporangehat  ( 2013-05-21 17:48:41 -0500 )edit

Super, thanks! Let me know if you have questions about the code.

Evgeny gravatar image Evgeny  ( 2013-05-21 17:52:38 -0500 )edit
1

I submitted a couple of pull requests.

  1. The code to actually process the xml was commented out.

  2. Some values in the Zendesk data were longer than the max_length defined for the mapped fields. I added a snippet to truncate the content (like forum descriptions) to satisfy the max_length requirement.

  3. I submitted a separate pull request to fix some unicode errors I was seeing in the django admin when trying to delete users and posts.

Hoping I can do more with the Zendesk import (support tickets, select forums to import) but these changes at least got it working for me in its current state.

kporangehat gravatar image kporangehat  ( 2013-05-22 00:27:23 -0500 )edit

Awesome, thank you, I've merged your pull requests.

Evgeny gravatar image Evgeny  ( 2013-05-22 00:30:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-05-21 16:30:28 -0500

Seen: 433 times

Last updated: May 21 '13