You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a plugin user,
in case of a connection error to NCBI (Error with gaierror is not JSON serializable), I want get-metadata to store all already retrieved metadata to an artifact.
Current behaviour
get-metadata fails without outputting any artifact by displaying the following Error: EntrezPy failed to connect to NCBI. Please check your internet connection and try again. It may help to wait a few minutes before retrying.
Expected behaviour
get-metadata should store the already retrieved metadata to an artifact and raise a connection warning for the remaining run IDs.
def handle_threaded_exception(args):
logger = set_up_logger('DEBUG', logger_name='ThreadedErrorsManager')
msg = 'Data fetching was interrupted by the following error: \n'
if 'gaierror is not JSON serializable' in str(args.exc_value):
msg += 'EntrezPy failed to connect to NCBI. Please check your ' \
'internet connection and try again. It may help to wait ' \
'a few minutes before retrying.'
# silence threads exiting correctly
elif issubclass(args.exc_type, SystemExit) and str(args.exc_value) == '0':
return
else:
msg += f'Caught {args.exc_type} with value "{args.exc_value}" ' \
f'in thread {args.thread}'
logger.exception(msg)
# This will send a SIGINT to the main thread, which will gracefully
# kill the running Q2 action. No artifacts will be saved.
os.kill(os.getpid(), signal.SIGINT)
The text was updated successfully, but these errors were encountered:
As a plugin user,
in case of a connection error to NCBI (Error with
gaierror is not JSON serializable
), I wantget-metadata
to store all already retrieved metadata to an artifact.Current behaviour
get-metadata
fails without outputting any artifact by displaying the following Error:EntrezPy failed to connect to NCBI. Please check your internet connection and try again. It may help to wait a few minutes before retrying.
Expected behaviour
get-metadata
should store the already retrieved metadata to an artifact and raise a connection warning for the remaining run IDs.Note for solving
I believe a change here is needed:
The text was updated successfully, but these errors were encountered: