Forums

Pinax starter project install getting "file could not be opened successfully"

When trying to get Pinax "account" starter project installed, I am getting a "tarfile.ReadError: file could not be opened successfully".

Is there something else I need to do in order to get this to work? The only commands I ran are:

virtualenv myenv

source myenv/bin/activate

pip install pinax-cli

pinax start account myproject

After some warnings regarding SSL (which are probably due to my using a free account, but probably not relevant to the problem at hand) the resulting error was:

Starting project from Pinax
Traceback (most recent call last):
  File "/home/moneymoy/myenv/bin/pinax", line 11, in <module>
  sys.exit(main())
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/core.py", line 700, in __call__
  return self.main(*args, **kwargs)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/core.py", line 680, in main
  rv = self.invoke(ctx)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/core.py", line 1027, in invoke
   return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/core.py", line 873, in invoke
   return ctx.invoke(self.callback, **ctx.params)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
   return callback(*args, **kwargs)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/decorators.py", line 63, in new_func
   return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/click/core.py", line 508, in invoke
   return callback(*args, **kwargs)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/pcli.py", line 98, in start
   start_project(projects[project], name, dev)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/pcli.py", line 35, in start_project
   call_command("startproject", name, **kwargs)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 130, in 
call_command
   return command.execute(*args, **defaults)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
   output = self.handle(*args, **options)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/core/management/commands/startproject.py", line 34, in handle
   super(Command, self).handle('project', project_name, target, **options)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/core/management/templates.py", line 126, in handle
   base_subdir)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/core/management/templates.py", line 213, in handle_template
   return self.extract(absolute_path)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/core/management/templates.py", line 314, in extract
   archive.extract(filename, tempdir)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/utils/archive.py", line 49, in extract
   with Archive(path) as archive:
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/utils/archive.py", line 58, in __init__
    self._archive = self._archive_cls(file)(file)
  File "/home/moneymoy/myenv/local/lib/python2.7/site-packages/django/utils/archive.py", line 137, in __init__
   self._archive = tarfile.open(file)
  File "/usr/lib/python2.7/tarfile.py", line 1665, in open
   raise ReadError("file could not be opened successfully")
tarfile.ReadError: file could not be opened successfully

Do you have any way of finding out what file it's failing to open?

I wasn't able to figure that out.

I'm not sure what's going on there. Perhaps you can ask on the Pinax forums or something.

Ok, thx for checking. Btw, were you able to reproduce the error with a paid account too?

Hi there, I managed to install pinax ok into a paid account, but when I tried it in a free account I got "Disk quota exceeded" -- maybe that could be it?

I tried again after doing a bit of disk cleanup, and then I got the exact same problem you did. (tarfile.ReadError: file could not be opened successfully). (and nowhere near maxing out the disk quota, so that was a read herring). That sounds like some kind of bug in the pinax installer. May be worth reporting to the pinax project?

In the meantime a paid account may fix the problem...

Ok, good to know that you were able to install properly on a paid account. This doesn't look to be a general Pinax installer issue since it installs fine everywhere else (my local machine, other hosting providers). But if it works fine for you with a paid account, that's all I need to know. I can just plan on stepping up to a paid account once I've got my app fully developed. Thanks for your help!

(have raised an issue with pinax: https://github.com/pinax/pinax/issues/124)