File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/apify/storage_clients/_file_system Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,12 @@ async def _sanitize_input_json_files(self) -> None:
83
83
for alternative_key in alternative_keys :
84
84
alternative_input_file = self .path_to_kvs / alternative_key
85
85
86
- # Refresh metadata to prevent inconsistencies
87
- with alternative_input_file .open () as f :
88
- input_data = await asyncio .to_thread (lambda : json .load (f ))
89
- await self .set_value (key = configuration .canonical_input_key , value = input_data )
86
+ # Only process files that actually exist
87
+ if alternative_input_file .exists ():
88
+ # Refresh metadata to prevent inconsistencies
89
+ with alternative_input_file .open () as f :
90
+ input_data = await asyncio .to_thread (lambda : json .load (f ))
91
+ await self .set_value (key = configuration .canonical_input_key , value = input_data )
90
92
91
93
@override
92
94
async def get_value (self , * , key : str ) -> KeyValueStoreRecord | None :
You can’t perform that action at this time.
0 commit comments