Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'i' referenced before assignment #463

Open
mggger opened this issue Sep 12, 2023 · 0 comments
Open

UnboundLocalError: local variable 'i' referenced before assignment #463

mggger opened this issue Sep 12, 2023 · 0 comments

Comments

@mggger
Copy link

mggger commented Sep 12, 2023

Hi, I have met some errors:

  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/sql/schema.py", line 4901, in reflect
    Table(name, self, **reflect_opts)
  File "<string>", line 2, in __new__
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/util/deprecations.py", line 375, in warned
    return fn(*args, **kwargs)
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/sql/schema.py", line 619, in __new__
    metadata._remove_table(name, schema)
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    compat.raise_(
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
    raise exception
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/sql/schema.py", line 614, in __new__
    table._init(name, metadata, *args, **kw)
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/sql/schema.py", line 689, in _init
    self._autoload(
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/sql/schema.py", line 724, in _autoload
    conn_insp.reflect_table(
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py", line 807, in reflect_table
    self._reflect_indexes(
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py", line 1035, in _reflect_indexes
    indexes = self.get_indexes(table_name, schema)
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sqlalchemy/engine/reflection.py", line 605, in get_indexes
    return self.dialect.get_indexes(
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyhive/sqlalchemy_hive.py", line 369, in get_indexes
    for col_name, _col_type, _comment in rows[i + 1:]:
UnboundLocalError: local variable 'i' referenced before assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant