You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/04/12 08:01:00 UTC

[GitHub] JustOnce opened a new issue #4810: Can't invoke function 'get_bind', as the proxy object has not yet been established for the Alembic 'Operations' class.

JustOnce opened a new issue #4810: Can't invoke function 'get_bind', as the proxy object has not yet been established for the Alembic 'Operations' class.
URL: https://github.com/apache/incubator-superset/issues/4810
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if any
   - [x] I have reproduced the issue with at least the latest released version of superset
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar
   
   
   ### Superset version
   0.24.0
   
   ### Alembic version
   0.9.9
   
   ### Expected results
   List migrations branches.
   
   ### Actual results
   Error 
   
   ```
   Traceback (most recent call last):
     File "superset.py", line 15, in <module>
       manager.run()
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/flask_script/__init__.py", line 417, in run
       result = self.handle(argv[0], argv[1:])
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/flask_script/__init__.py", line 386, in handle
       res = handle(*args, **config)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/flask_script/commands.py", line 216, in __call__
       return self.run(*args, **kwargs)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/flask_migrate/__init__.py", line 344, in branches
       command.branches(config, verbose=verbose)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/command.py", line 421, in branches
       for sc in script.walk_revisions():
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/base.py", line 195, in walk_revisions
       head, base, inclusive=True, assert_relative_length=False):
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/revision.py", line 645, in _iterate_revisions
       requested_lowers = self.get_revisions(lower)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/revision.py", line 301, in get_revisions
       resolved_id, branch_label = self._resolve_revision_number(id_)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/revision.py", line 437, in _resolve_revision_number
       self._revision_map
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/util/langhelpers.py", line 239, in __get__
       obj.__dict__[self.__name__] = result = self.fget(obj)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/revision.py", line 122, in _revision_map
       for revision in self._generator():
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/base.py", line 99, in _load_revisions
       script = Script._from_filename(self, vers, file_)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/script/base.py", line 812, in _from_filename
       module = util.load_python_file(dir_, filename)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file
       module = load_module_py(module_id, path)
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/util/compat.py", line 141, in load_module_py
       mod = imp.load_source(module_id, path, fp)
     File "/home/justonce/pycharm_projects/superset/superset/migrations/versions/f231d82b9b26_.py", line 28, in <module>
       bind = op.get_bind()
     File "<string>", line 7, in get_bind
     File "/home/justonce/virtenv/superset/local/lib/python2.7/site-packages/alembic/util/langhelpers.py", line 99, in _name_error
       name, cls.__name__
   NameError: Can't invoke function 'get_bind', as the proxy object has not yet been established for the Alembic 'Operations' class.  Try placing this code inside a callable.
   ```
   
   ### Steps to reproduce
   Call command 
   
   `$ ~/virtenv/superset/bin/python superset.py db branches`
   
   P.S. 
   Looks like promleb in file superset/migrations/versions/f231d82b9b26_.py
   There was similar bug earlier in another file https://github.com/apache/incubator-superset/pull/3948
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services