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

As of Flask-SQLAlchemy 3.0, all arguments to paginate are keyword-only #641

Closed
fbermel opened this issue Jan 4, 2023 · 4 comments
Closed
Labels
Unsupported OS Issues occuring when run on OSs ARM doesn't support

Comments

@fbermel
Copy link

fbermel commented Jan 4, 2023

For example the history in the webui doesn't work because of it. It throws internal server error:

ERROR:arm.ui:Exception on /history [GET]
Traceback (most recent call last):
  File "/opt/arm/.venv/arm/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/arm/.venv/arm/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/arm/.venv/arm/lib/python3.9/site-packages/flask_cors/extension.py", line 165, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/opt/arm/.venv/arm/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/arm/.venv/arm/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/opt/arm/.venv/arm/lib/python3.9/site-packages/flask_login/utils.py", line 290, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
  File "/opt/arm/arm/../arm/ui/routes.py", line 493, in history
    jobs = Job.query.order_by(Job.start_time.desc()).paginate(page, 100, False)
TypeError: paginate() takes 1 positional argument but 4 were given

model.py:228 and model.py:493 need to be changed to this respectively:

line 228

jobs = Job.query.order_by(db.desc(Job.job_id)).paginate(page=page, per_page=100, error_out=False)

line 493

jobs = Job.query.order_by(Job.start_time.desc()).paginate(page=page, per_page=100, error_out=False)

I've changed this on my install and now the history is working again.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2023

If youre having issues, please remember to read the wiki and follow the instructions carefully

@microtechno9000
Copy link
Collaborator

Currently ARM doest support running on 22.04, and SQLAlchemy 3.0 due to this and other breaking changes

@1337-server 1337-server added the Unsupported OS Issues occuring when run on OSs ARM doesn't support label Jan 5, 2023
@cmbernard333
Copy link
Contributor

Darn. I really like arm and upgraded to 22.04. Is there a hotfix or patch planned for this?

@shitwolfymakes
Copy link
Member

Darn. I really like arm and upgraded to 22.04. Is there a hotfix or patch planned for this?

Not at the moment, but that's part of why we've spent so much time on the docker container. Just make sure to delete the udev rules that are already there, as it will trigger the docker container as well

@shitwolfymakes shitwolfymakes closed this as not planned Won't fix, can't repro, duplicate, stale Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unsupported OS Issues occuring when run on OSs ARM doesn't support
Projects
None yet
Development

No branches or pull requests

5 participants