FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp3gu3pioi/HEPData-ins2623797-v1-root/Observed_PtH_InLH_Aug23.pdf.yml'
sentry_patched_wsgi_app
def sentry_patched_wsgi_app(self, environ, start_response):
# type: (Any, Dict[str, str], Callable[..., Any]) -> _ScopedResponse
if Hub.current.get_integration(FlaskIntegration) is None:
return old_app(self, environ, start_response)
return SentryWsgiMiddleware(lambda *a, **kw: old_app(self, *a, **kw))(
environ, start_response
)
Flask.__call__ = sentry_patched_wsgi_app
__call__
partial(
_sentry_start_response, start_response, transaction
),
)
except BaseException:
reraise(*_capture_exception(hub))
finally:
_wsgi_middleware_applied.set(False)
return _ScopedResponse(hub, rv)
reraise
def reraise(tp, value, tb=None):
# type: (Optional[Type[BaseException]], Optional[BaseException], Optional[Any]) -> None
assert value is not None
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
raise value
# contextlib.contextmanager already can be used as decorator in Python 3.2+
contextmanager = contextlib.contextmanager
__call__
with hub.start_transaction(
transaction, custom_sampling_context={"wsgi_environ": environ}
):
try:
rv = self.app(
environ,
partial(
_sentry_start_response, start_response, transaction
),
)
<lambda>
def sentry_patched_wsgi_app(self, environ, start_response):
# type: (Any, Dict[str, str], Callable[..., Any]) -> _ScopedResponse
if Hub.current.get_integration(FlaskIntegration) is None:
return old_app(self, environ, start_response)
return SentryWsgiMiddleware(lambda *a, **kw: old_app(self, *a, **kw))(
environ, start_response
)
Flask.__call__ = sentry_patched_wsgi_app
__call__
def __call__(self, environ: dict, start_response: t.Callable) -> t.Any:
"""The WSGI server calls the Flask application object as the
WSGI application. This calls :meth:`wsgi_app`, which can be
wrapped to apply middleware.
"""
return self.wsgi_app(environ, start_response)
wsgi_app
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
raise
return response(environ, start_response)
finally:
wsgi_app
ctx = self.request_context(environ)
error: BaseException | None = None
try:
try:
ctx.push()
response = self.full_dispatch_request()
except Exception as e:
error = e
response = self.handle_exception(e)
except: # noqa: B001
error = sys.exc_info()[1]
full_dispatch_request
request_started.send(self, _async_wrapper=self.ensure_sync)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
self,
rv: ft.ResponseReturnValue | HTTPException,
full_dispatch_request
try:
request_started.send(self, _async_wrapper=self.ensure_sync)
rv = self.preprocess_request()
if rv is None:
rv = self.dispatch_request()
except Exception as e:
rv = self.handle_user_exception(e)
return self.finalize_request(rv)
def finalize_request(
dispatch_request
and req.method == "OPTIONS"
):
return self.make_default_options_response()
# otherwise dispatch to the handler for that endpoint
view_args: dict[str, t.Any] = req.view_args # type: ignore[assignment]
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
def full_dispatch_request(self) -> Response:
"""Dispatches the request and on top of that performs request
pre and postprocessing as well as HTTP exception catching and
error handling.
convert
path, dirs, files = walked[0]
conversion_input = os.path.join(path, files[0])
else:
conversion_input = conversion_input + '/' + archive_name + '/'
hepdata_converter.convert(conversion_input,
conversion_output,
kwargs.get('options', {}))
if not os.path.isdir(conversion_output):
output_format = output_format[:-1] if output_format == 'yoda1' else output_format
convert
# if no output was specified create proxy output to which writer can insert data
_output = output
if not _output:
_output = StringIO()
writer.write(parser.parse(input), _output)
# if no output was specified return output
if not output:
return _output.getvalue()
parse
if 'data_file' not in submission_data[i]:
metadata = submission_data[i] # information about whole submission
continue
table_filepath = os.path.join(os.path.dirname(data_in),
submission_data[i]['data_file'])
with open(table_filepath, 'r') as table_file:
if not os.path.exists(table_filepath):
raise ValueError(
"table file: %s does not exist" % table.data_file)
table_data = yaml.load(table_file, Loader=Loader)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp3gu3pioi/HEPData-ins2623797-v1-root/Observed_PtH_InLH_Aug23.pdf.yml'
This is the Copy/Paste friendly version of the traceback.
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.