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

Creating a set does not update affected records #180

Open
lnielsen opened this issue Feb 17, 2020 · 1 comment
Open

Creating a set does not update affected records #180

lnielsen opened this issue Feb 17, 2020 · 1 comment

Comments

@lnielsen
Copy link
Member

Reproduce

  1. Install Invenio v3.2 (https://inveniosoftware.org/products/framework/)
  2. Login as an admin (i.e. create an account and assign admin role)
  3. Create a new OAI set via the administration interface.

Problem

Creating the sets, starts a background task in celery which then seems to be rate limited. See error below.

[2020-02-17 10:41:54,759: INFO/MainProcess] Received task: invenio_oaiserver.tasks.update_affected_records[73318bac-d8a3-4501-a17b-d53652826b8b]
127.0.0.1 - - [17/Feb/2020 10:41:54] "POST /admin/oaiset/edit/?id=1&url=%2Fadmin%2Foaiset%2F HTTP/1.1" 302 -
[2020-02-17 10:41:55,065: ERROR/ForkPoolWorker-4] Task invenio_oaiserver.tasks.update_affected_records[73318bac-d8a3-4501-a17b-d53652826b8b] raised unexpected: TypeError('must be str, not NoneType',)
Traceback (most recent call last):
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/flask_celeryext/app.py", line 100, in __call__
    self.app.flask_app.preprocess_request()
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/flask/app.py", line 2241, in preprocess_request
    rv = func()
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/flask_limiter/extension.py", line 511, in __check_request_limit
    six.reraise(*sys.exc_info())
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/six.py", line 703, in reraise
    raise value
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/flask_limiter/extension.py", line 494, in __check_request_limit
    self.__evaluate_limits(endpoint, all_limits)
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/flask_limiter/extension.py", line 366, in __evaluate_limits
    limit_key = lim.key_func()
  File "/Users/lnielsen/envs/my-site-ZNC6mTtx/lib/python3.6/site-packages/invenio_app/limiter.py", line 19, in useragent_and_ip_limit_key
    return str(request.user_agent) + request.remote_addr
TypeError: must be str, not NoneType
@ppanero
Copy link
Member

ppanero commented Feb 1, 2022

@lnielsen with the new dynamic sets, this can be closed right? i.e. does not apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants