Revision history  [back]

OSError when trying to import StackExchange dump

We are migrating our SE 1.0 site to AskBot. I've installed askbot successfully. If I try to import the dump on a web browser I get this:

OSError at /import-data/
[Errno 2] No such file or directory: '/var/www/my-site/tmp/tmpQ011U4.upload'

Traceback:

...
  135.         self.file = TemporaryUploadedFile(self.file_name, self.content_type, 0, self.charset)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/uploadedfile.py" in __init__
  64.                 dir=settings.FILE_UPLOAD_TEMP_DIR)
File "/usr/lib/python2.7/tempfile.py" in NamedTemporaryFile
  454.     (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
File "/usr/lib/python2.7/tempfile.py" in _mkstemp_inner
  235.             fd = _os.open(file, flags, 0600)

Exception Type: OSError at /import-data/
Exception Value: [Errno 2] No such file or directory: '/var/www/my-site/tmp/tmpnyH5zD.upload'

If I try to import it via the console I get the following error:

...
cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "stackexchange_votetype" does not exist
LINE 1: SELECT (1) AS "a" FROM "stackexchange_votetype" WHERE "stack...

OSError when trying to import StackExchange dump

We are migrating our SE 1.0 site to AskBot. I've installed askbot successfully. If I try to import the dump on a web browser I get this:

OSError at /import-data/
[Errno 2] No such file or directory: '/var/www/my-site/tmp/tmpQ011U4.upload'

Traceback:

...
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  105.                         response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/askbot/middleware/cancel.py" in process_view
  5.         if 'cancel' in request.REQUEST:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py" in _get_request
  196.             self._request = datastructures.MergeDict(self.POST, self.GET)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py" in _get_post
  210.             self._load_post_and_files()
File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py" in _load_post_and_files
  277.                 self._post, self._files = self.parse_file_upload(self.META, data)
File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py" in parse_file_upload
  235.         return parser.parse()
File "/usr/local/lib/python2.7/dist-packages/django/http/multipartparser.py" in parse
  193.                                                  charset)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/uploadhandler.py" in new_file
  135.         self.file = TemporaryUploadedFile(self.file_name, self.content_type, 0, self.charset)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/uploadedfile.py" in __init__
  64.                 dir=settings.FILE_UPLOAD_TEMP_DIR)
File "/usr/lib/python2.7/tempfile.py" in NamedTemporaryFile
  454.     (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
File "/usr/lib/python2.7/tempfile.py" in _mkstemp_inner
  235.             fd = _os.open(file, flags, 0600)

Exception Type: OSError at /import-data/
Exception Value: [Errno 2] No such file or directory: '/var/www/my-site/tmp/tmpnyH5zD.upload'

If I try to import it via the console I get the following error:

...
from django.db import models
/usr/local/lib/python2.7/dist-packages/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.filesystem_load_template_source
  warnings.warn('Cannot translate loader: %s' % loader)
loading from VoteTypes.xml to VoteType
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
   execute_manager(settings)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
  File "/usr/local/lib/python2.7/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.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 217, in inner
res = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/askbot/importers/stackexchange/management/commands/load_stackexchange.py", line 306, in handle
self.load_xml_file(item)
  File "/usr/local/lib/python2.7/dist-packages/askbot/importers/stackexchange/management/commands/load_stackexchange.py", line 840, in load_xml_file
model_entry.save()
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 522, in save_base
manager.using(using).filter(pk=pk_val).exists())):
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 496, in exists
return self.query.has_results(using=self.db)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 424, in has_results
return bool(compiler.execute_sql(SINGLE))
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "stackexchange_votetype" does not exist
LINE 1: SELECT (1) AS "a" FROM "stackexchange_votetype" WHERE "stack...

OSError when trying to import StackExchange impor SE dump

We are migrating our SE 1.0 site to AskBot. I've installed askbot successfully. If I try to import the dump on a web browser I get this:

OSError at /import-data/
[Errno 2] No such file or directory: '/var/www/my-site/tmp/tmpQ011U4.upload'

Traceback:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  105.                         response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/askbot/middleware/cancel.py" in process_view
  5.         if 'cancel' in request.REQUEST:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py" in _get_request
  196.             self._request = datastructures.MergeDict(self.POST, self.GET)
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py" in _get_post
  210.             self._load_post_and_files()
File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py" in _load_post_and_files
  277.                 self._post, self._files = self.parse_file_upload(self.META, data)
File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py" in parse_file_upload
  235.         return parser.parse()
File "/usr/local/lib/python2.7/dist-packages/django/http/multipartparser.py" in parse
  193.                                                  charset)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/uploadhandler.py" in new_file
  135.         self.file = TemporaryUploadedFile(self.file_name, self.content_type, 0, self.charset)
File "/usr/local/lib/python2.7/dist-packages/django/core/files/uploadedfile.py" in __init__
  64.                 dir=settings.FILE_UPLOAD_TEMP_DIR)
File "/usr/lib/python2.7/tempfile.py" in NamedTemporaryFile
  454.     (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
File "/usr/lib/python2.7/tempfile.py" in _mkstemp_inner
  235.             fd = _os.open(file, flags, 0600)

Exception Type: OSError at /import-data/
Exception Value: [Errno 2] No such file or directory: '/var/www/my-site/tmp/tmpnyH5zD.upload'

If I try to import it via the console I get the following error:

from django.db import models
/usr/local/lib/python2.7/dist-packages/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.filesystem_load_template_source
  warnings.warn('Cannot translate loader: %s' % loader)
loading from VoteTypes.xml to VoteType
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
   execute_manager(settings)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
  File "/usr/local/lib/python2.7/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.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 217, in inner
res = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/askbot/importers/stackexchange/management/commands/load_stackexchange.py", line 306, in handle
self.load_xml_file(item)
  File "/usr/local/lib/python2.7/dist-packages/askbot/importers/stackexchange/management/commands/load_stackexchange.py", line 840, in load_xml_file
model_entry.save()
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 522, in save_base
manager.using(using).filter(pk=pk_val).exists())):
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 496, in exists
return self.query.has_results(using=self.db)
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py", line 424, in has_results
return bool(compiler.execute_sql(SINGLE))
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: relation "stackexchange_votetype" does not exist
LINE 1: SELECT (1) AS "a" FROM "stackexchange_votetype" WHERE "stack...