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

Cannot create ePIC PIDs for the existing records via CLI #1902

Closed
gcakir opened this issue Apr 25, 2023 · 0 comments · Fixed by #1903
Closed

Cannot create ePIC PIDs for the existing records via CLI #1902

gcakir opened this issue Apr 25, 2023 · 0 comments · Fixed by #1903

Comments

@gcakir
Copy link
Contributor

gcakir commented Apr 25, 2023

I attempted to create an ePIC PID for an existing record that initially did not have any ePIC PID via the command line interface.But it fails with the error below (the command as well as its error logs are quotedbelow). Setting the environment variable SERVER_NAME (via export SERVER_NAME='http://localhost:5000') did not fix the issue.

$ b2share records manage check_handles 9347abba54284b24b7f7876dc836acf9 -u
/b2inst/venv/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
record 9347abba54284b24b7f7876dc836acf9 has no handle
Traceback (most recent call last):
  File "/b2inst/venv/bin/b2share", line 33, in <module>
    sys.exit(load_entry_point('b2share', 'console_scripts', 'b2share')())
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/b2inst/venv/lib/python3.6/site-packages/flask/cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/b2inst/venv/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/b2inst/venv/lib/python3.6/site-packages/flask/cli.py", line 229, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/b2inst/venv/lib/python3.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/b2inst/b2share/modules/records/cli.py", line 124, in check_handles
    b2share_pid_minter(rec_pid, record)
  File "/b2inst/b2share/modules/records/minters.py", line 92, in b2share_pid_minter
    url = make_record_url(rec_pid.pid_value)
  File "/b2inst/b2share/modules/records/minters.py", line 151, in make_record_url
    url = url_for(endpoint, pid_value=recid, _external=True)
  File "/b2inst/venv/lib/python3.6/site-packages/flask/helpers.py", line 298, in url_for
    raise RuntimeError('Application was not able to create a URL '
RuntimeError: Application was not able to create a URL adapter for request independent URL generation. You might be able to fix this by setting the SERVER_NAME config variable.
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.

1 participant