fernando-peres commited on
Commit
7558721
·
1 Parent(s): 147918c

resolving card bugs

Browse files
Files changed (1) hide show
  1. py_legislation.py +4 -4
py_legislation.py CHANGED
@@ -279,7 +279,7 @@ class PYLegislation(datasets.GeneratorBasedBuilder):
279
  rt_train = dl_manager.download_and_extract(
280
  # os.path.join(root,
281
  # os.path.abspath(os.path.join("/src/services/worker/",_metadata["urls"]["raw_text"]))
282
- _metadata["urls"]["raw_text"])
283
  # )
284
 
285
  # us_train = dl_manager.download_and_extract(
@@ -345,11 +345,11 @@ class PYLegislation(datasets.GeneratorBasedBuilder):
345
  Obs: method parameters are unpacked from `gen_kwargs` as given in `_split_generators`.
346
  """
347
  # Ensure that the filepath is an absolute local file path
348
- # filepath = os.path.abspath(filepath)
349
 
350
  # Check if the file exists
351
- # if not os.path.exists(filepath):
352
- # raise FileNotFoundError(f"File not found: {filepath}")
353
 
354
  pq_table = pq.read_table(filepath)
355
  for i in range(len(pq_table)):
 
279
  rt_train = dl_manager.download_and_extract(
280
  # os.path.join(root,
281
  # os.path.abspath(os.path.join("/src/services/worker/",_metadata["urls"]["raw_text"]))
282
+ urls_to_download["raw_text"])
283
  # )
284
 
285
  # us_train = dl_manager.download_and_extract(
 
345
  Obs: method parameters are unpacked from `gen_kwargs` as given in `_split_generators`.
346
  """
347
  # Ensure that the filepath is an absolute local file path
348
+ filepath = os.path.abspath(filepath)
349
 
350
  # Check if the file exists
351
+ if not os.path.exists(filepath):
352
+ raise FileNotFoundError(f"File not found: {filepath}")
353
 
354
  pq_table = pq.read_table(filepath)
355
  for i in range(len(pq_table)):