# DEBUG: print(f"DEBUG: Adding domain='{entry['domain']}' ...")
domains.append(entry["domain"])
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as exception:
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
print(f"ERROR: Cannot fetch graphql,exception[{type(exception)}]:'{str(exception)}'")
sys.exit(255)
try:
print(f"INFO: Fetching instances from domain='{domain}' ...")
federation.fetch_instances(domain, None, None, inspect.currentframe().f_code.co_name)
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from domain='{domain}'")
- instances.update_last_error(domain, ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from domain='{domain}'")
+ instances.update_last_error(domain, exception)
# DEBUG: print("DEBUG: EXIT!")
try:
print(f"INFO: Fetching instances from domain='{row['domain']}' ...")
federation.fetch_instances(row["domain"], 'chaos.social', None, inspect.currentframe().f_code.co_name)
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from domain='{row['domain']}'")
- instances.update_last_error(row["domain"], ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from domain='{row['domain']}'")
+ instances.update_last_error(row["domain"], exception)
# DEBUG: print("DEBUG: Committing changes ...")
fba.connection.commit()
try:
print(f"INFO: Fetching instances from domain='{domain}' ...")
federation.fetch_instances(domain, None, None, inspect.currentframe().f_code.co_name)
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from domain='{domain}'")
- instances.update_last_error(domain, ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from domain='{domain}'")
+ instances.update_last_error(domain, exception)
# DEBUG: print("DEBUG: EXIT!")
try:
print(f"INFO: Fetching instances from domain='{domain}' ...")
federation.fetch_instances(domain, None, None, inspect.currentframe().f_code.co_name)
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from domain='{domain}'")
- instances.update_last_error(domain, ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from domain='{domain}'")
+ instances.update_last_error(domain, exception)
# DEBUG: print("DEBUG: EXIT!")
try:
print(f"INFO: Fetching instances from args.domain='{args.domain}' ...")
federation.fetch_instances(args.domain, None, None, inspect.currentframe().f_code.co_name)
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from args.domain='{args.domain}'")
- instances.update_last_error(args.domain, ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from args.domain='{args.domain}'")
+ instances.update_last_error(args.domain, exception)
return
if args.single:
try:
print(f"INFO: Fetching instances for instance '{row[0]}' ('{row[2]}') of origin='{row[1]}',nodeinfo_url='{row[3]}'")
federation.fetch_instances(row[0], row[1], row[2], inspect.currentframe().f_code.co_name, row[3])
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from domain='{row[0]}'")
- instances.update_last_error(row[0], ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from domain='{row[0]}'")
+ instances.update_last_error(row[0], exception)
# DEBUG: print("DEBUG: EXIT!")
try:
print(f"INFO: Fetching instances for instane='{row['#domain']}' ...")
federation.fetch_instances(row["#domain"], None, None, inspect.currentframe().f_code.co_name)
- except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as ex:
- print(f"WARNING: Exception '{type(ex)}' during fetching instances from domain='{row['#domain']}'")
- instances.update_last_error(row["#domain"], ex)
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError, UnicodeEncodeError) as exception:
+ print(f"WARNING: Exception '{type(exception)}' during fetching instances from domain='{row['#domain']}'")
+ instances.update_last_error(row["#domain"], exception)
# DEBUG: print("DEBUG: EXIT!")