Forums

running a superset server

Hello, I am trying this great new thing called superset, it's a data exploration platform developed (and opensourced) by airbnb. I have a few web apps slots available in my (paid) account and I believe superset runs on Flask like all my other web apps, so I'm hopeful.

Managed to pip install superset --user

but only the first few steps in this installation guide are successful (stopped at superset db upgrade) http://airbnb.io/superset/installation.html#getting-started

anybody else attempted that? All my data is on PA and I'd love to test this technology on the PA servers.

what's the error that you are seeing?

when running

superset db upgrade

The error is:

  mod = imp.load_source(module_id, path, fp)
File "/home/sergiolucerovera/.local/lib/python2.7/site-packages/superset/migrations/env.py", line 100, in <module>
  run_migrations_online()
File "/home/sergiolucerovera/.local/lib/python2.7/site-packages/superset/migrations/env.py", line 93, in run_migrations_online
  context.run_migrations()
File "<string>", line 7, in run_migrations
File "/usr/local/lib/python2.7/dist-packages/alembic/environment.py", line 652, in run_migrations
  self.get_context().run_migrations(**kw)
File "/usr/local/lib/python2.7/dist-packages/alembic/migration.py", line 210, in run_migrations
self):
File "/usr/local/lib/python2.7/dist-packages/alembic/command.py", line 113, in upgrade
  return script._upgrade_revs(revision, rev)
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 179, in _upgrade_revs
  for script in reversed(list(revs))
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 162, in _iterate_revisions
  upper = self.get_revision(upper)
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 96, in get_revision
  id_ = self.as_revision_number(id_)
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 122, in as_revision_number
  id_ = self.get_current_head()
File "/usr/local/lib/python2.7/dist-packages/alembic/script.py", line 257, in get_current_head
  raise util.CommandError('Only a single head is supported. The '
alembic.util.CommandError: Only a single head is supported. The script directory has multiple heads (due to branching), which must be resolved by manually editing the revision files to form a linear sequence. Run `alembic branches` to see the divergence(s).

That's really strange. I'd read that as a bug in the superset install, because it seems to be saying that there are database migrations that don't work together. Have you done any customisation? Or is this simply what you've encountered following the instructions on the page you linked to? If the latter, perhaps it's worth posting something on their Google Group or their chat channel -- both are linked in the "Resources" section on their GitHub page

I finally managed, the instructions said I should be using a virtualenv. But now how can I access the running server? DO I need to modify NGINX??

do you need to customize nginx or just get your webapp up and running?

The service is running, now I'd like to know how to access it via web. I can do this locally when I run it on my laptop.

Are you running it in a console? You'll need to configure a web app on the "Web" tab to run the Flask app that makes up superset, and then you can access it via the URL you've configured for that web app.

I am getting Badzip file error while installing superset, any idea ? 02:19 ~ $ pip install superset Collecting superset Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 310, in run wb.build(autobuilding=True) File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 750, in build self.requirement_set.prepare_files(self.finder) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 370, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 587, in _prepare_file session=self.session, hashes=hashes) File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 798, in unpack_url unpack_file_url(link, location, download_dir, hashes=hashes) File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 705, in unpack_file_url unpack_file(from_path, location, content_type, link) File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 599, in unpack_file flatten=not filename.endswith('.whl') File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 484, in unzip_file zip = zipfile.ZipFile(zipfp, allowZip64=True) File "/usr/lib/python2.7/zipfile.py", line 770, in init self._RealGetContents() File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents raise BadZipfile, "File is not a zip file" BadZipfile: File is not a zip file

I am getting Badzip file error while installing superset, any idea ? 02:19 ~ $ pip install superset Collecting superset Exception: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 310, in run wb.build(autobuilding=True) File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 750, in build self.requirement_set.prepare_files(self.finder) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 370, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 587, in _prepare_file session=self.session, hashes=hashes) File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 798, in unpack_url unpack_file_url(link, location, download_dir, hashes=hashes) File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 705, in unpack_file_url unpack_file(from_path, location, content_type, link) File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 599, in unpack_file flatten=not filename.endswith('.whl') File "/usr/local/lib/python2.7/dist-packages/pip/utils/init.py", line 484, in unzip_file zip = zipfile.ZipFile(zipfp, allowZip64=True) File "/usr/lib/python2.7/zipfile.py", line 770, in init self._RealGetContents() File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents raise BadZipfile, "File is not a zip file" BadZipfile: File is not a zip file

Hi there,

I would try cleaning up and starting again with a virtualenv:

pip uninstall superset
mkvirtualenv --python=python3.6 superset  # or whichever version of python you like
pip install superset

let us know if that helps? more info here:

http://help.pythonanywhere.com/pages/InstallingNewModules

http://help.pythonanywhere.com/pages/Virtualenvs

@ sergiolucerovera, did you get your Superset installation to work? If yes, can I ask how you proceeded to deploy it on the web interface?

@tmo what problems are you having with superset?

Hi conrad,

this was solved (embarrassingly easy), look for future reference here.