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

bug with alembic=1.11 #419

Closed
xg1990 opened this issue May 21, 2023 · 1 comment · Fixed by #423
Closed

bug with alembic=1.11 #419

xg1990 opened this issue May 21, 2023 · 1 comment · Fixed by #423

Comments

@xg1990
Copy link

xg1990 commented May 21, 2023

  File "/usr/local/lib/python3.11/site-packages/scrapy/core/spidermw.py", line 106, in process_sync
    for r in iterable:
  File "/usr/local/lib/python3.11/site-packages/scrapy/spidermiddlewares/depth.py", line 31, in <genexpr>
    return (r for r in result or () if self._filter(r, response, spider))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/scrapy/core/spidermw.py", line 106, in process_sync
    for r in iterable:
  File "/app/homesearch/spiders/domain.py", line 121, in parse
    db["properties"].upsert(_property_data, ["domain_id"])
  File "/usr/local/lib/python3.11/site-packages/dataset/table.py", line 261, in upsert
    row = self._sync_columns(row, ensure, types=types)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dataset/table.py", line 381, in _sync_columns
    self._sync_table(sync_columns.values())
  File "/usr/local/lib/python3.11/site-packages/dataset/table.py", line 356, in _sync_table
    self.db.op.add_column(self.name, column, self.db.schema)
TypeError: add_column() takes 3 positional arguments but 4 were given

The latest alembic=1.12 has a different add_column()

Downgrading to alembic=1.10 can solve the problem

nedbat pushed a commit to openedx/repo-tools that referenced this issue Jun 19, 2023
The bug report: pudo/dataset#419

Without the pin, this error happens when running this command:

```
$ conventional_commits collect --ignore='*-private' edx/* openedx/*
Traceback (most recent call last):
  File "/usr/local/virtualenvs/repo-tools/bin/conventional_commits", line 33, in <module>
    sys.exit(load_entry_point('edx-repo-tools', 'console_scripts', 'conventional_commits')())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 134, in collect
    load_commits(db, repo_name)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 71, in load_commits
    commit_table.insert(row)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 118, in insert
    row = self._sync_columns(row, ensure, types=types)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 381, in _sync_columns
    self._sync_table(sync_columns.values())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 356, in _sync_table
    self.db.op.add_column(self.name, column, self.db.schema)
TypeError: add_column() takes 3 positional arguments but 4 were given
```
@hans-fiby
Copy link

I just changed line 356 in table.py to:

   self.db.op.add_column(self.name, column, schema=self.db.schema)

now it works with alembic=1.12

nedbat pushed a commit to openedx/repo-tools that referenced this issue Jun 22, 2023
The bug report: pudo/dataset#419

Without the pin, this error happens when running this command:

```
$ conventional_commits collect --ignore='*-private' edx/* openedx/*
Traceback (most recent call last):
  File "/usr/local/virtualenvs/repo-tools/bin/conventional_commits", line 33, in <module>
    sys.exit(load_entry_point('edx-repo-tools', 'console_scripts', 'conventional_commits')())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 134, in collect
    load_commits(db, repo_name)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 71, in load_commits
    commit_table.insert(row)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 118, in insert
    row = self._sync_columns(row, ensure, types=types)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 381, in _sync_columns
    self._sync_table(sync_columns.values())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 356, in _sync_table
    self.db.op.add_column(self.name, column, self.db.schema)
TypeError: add_column() takes 3 positional arguments but 4 were given
```
nedbat pushed a commit to openedx/repo-tools that referenced this issue Jun 22, 2023
The bug report: pudo/dataset#419

Without the pin, this error happens when running this command:

```
$ conventional_commits collect --ignore='*-private' edx/* openedx/*
Traceback (most recent call last):
  File "/usr/local/virtualenvs/repo-tools/bin/conventional_commits", line 33, in <module>
    sys.exit(load_entry_point('edx-repo-tools', 'console_scripts', 'conventional_commits')())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 134, in collect
    load_commits(db, repo_name)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 71, in load_commits
    commit_table.insert(row)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 118, in insert
    row = self._sync_columns(row, ensure, types=types)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 381, in _sync_columns
    self._sync_table(sync_columns.values())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 356, in _sync_table
    self.db.op.add_column(self.name, column, self.db.schema)
TypeError: add_column() takes 3 positional arguments but 4 were given
```
nedbat pushed a commit to openedx/repo-tools that referenced this issue Jun 26, 2023
The bug report: pudo/dataset#419

Without the pin, this error happens when running this command:

```
$ conventional_commits collect --ignore='*-private' edx/* openedx/*
Traceback (most recent call last):
  File "/usr/local/virtualenvs/repo-tools/bin/conventional_commits", line 33, in <module>
    sys.exit(load_entry_point('edx-repo-tools', 'console_scripts', 'conventional_commits')())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 134, in collect
    load_commits(db, repo_name)
  File "/System/Volumes/Data/root/src/edx/src/repo-tools/edx_repo_tools/conventional_commits/commitstats.py", line 71, in load_commits
    commit_table.insert(row)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 118, in insert
    row = self._sync_columns(row, ensure, types=types)
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 381, in _sync_columns
    self._sync_table(sync_columns.values())
  File "/usr/local/virtualenvs/repo-tools/lib/python3.8/site-packages/dataset/table.py", line 356, in _sync_table
    self.db.op.add_column(self.name, column, self.db.schema)
TypeError: add_column() takes 3 positional arguments but 4 were given
```
@pudo pudo closed this as completed in #423 Jul 12, 2023
nedbat pushed a commit to openedx/repo-tools that referenced this issue Jul 17, 2023
This bug: pudo/dataset#419 has been fixed in
pudo/dataset#423, so we don't need to pin
alembic anymore.
nedbat pushed a commit to openedx/repo-tools that referenced this issue Jul 18, 2023
This bug: pudo/dataset#419 has been fixed in
pudo/dataset#423, so we don't need to pin
alembic anymore.
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

Successfully merging a pull request may close this issue.

2 participants