worker-automate-hub 0.4.418__py3-none-any.whl → 0.4.420__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- worker_automate_hub/tasks/jobs/entrada_de_notas_39.py +1 -1
- worker_automate_hub/tasks/jobs/entrada_de_notas_9.py +22 -5
- {worker_automate_hub-0.4.418.dist-info → worker_automate_hub-0.4.420.dist-info}/METADATA +1 -1
- {worker_automate_hub-0.4.418.dist-info → worker_automate_hub-0.4.420.dist-info}/RECORD +6 -6
- {worker_automate_hub-0.4.418.dist-info → worker_automate_hub-0.4.420.dist-info}/WHEEL +0 -0
- {worker_automate_hub-0.4.418.dist-info → worker_automate_hub-0.4.420.dist-info}/entry_points.txt +0 -0
@@ -728,7 +728,7 @@ async def entrada_de_notas_39(task: RpaProcessoEntradaDTO) -> RpaRetornoProcesso
|
|
728
728
|
break
|
729
729
|
else:
|
730
730
|
console.print(f"Aguardando confirmação de nota incluida...\n")
|
731
|
-
await worker_sleep(
|
731
|
+
await worker_sleep(5)
|
732
732
|
i += 1
|
733
733
|
|
734
734
|
await worker_sleep(15)
|
@@ -463,6 +463,7 @@ async def entrada_de_notas_9(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
463
463
|
|
464
464
|
max_attempts = 3
|
465
465
|
attempts = 0
|
466
|
+
captured_text = None
|
466
467
|
resultado = None
|
467
468
|
while attempts < max_attempts:
|
468
469
|
main_window.set_focus()
|
@@ -493,9 +494,7 @@ async def entrada_de_notas_9(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
493
494
|
console.print(f"Realizando OCR...\n")
|
494
495
|
await worker_sleep(1)
|
495
496
|
captured_text = pytesseract.image_to_string(Image.open(path_to_png))
|
496
|
-
console.print(
|
497
|
-
f"Texto Full capturado {captured_text}...\n"
|
498
|
-
)
|
497
|
+
console.print(f"Texto Full capturado {captured_text}...\n")
|
499
498
|
os.remove(path_to_png)
|
500
499
|
|
501
500
|
pattern_qtd_restante = r"Quantidade restante:\s([\d,]+)"
|
@@ -503,6 +502,24 @@ async def entrada_de_notas_9(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
503
502
|
if resultado:
|
504
503
|
break
|
505
504
|
else:
|
505
|
+
await worker_sleep(2)
|
506
|
+
console.print(f"Não conseguiu encontrar a quantidade restante, tentando cortar a imagem...\n")
|
507
|
+
width, height = image.size
|
508
|
+
box = (0, height - 100, width, height)
|
509
|
+
cropped_image = image.crop(box)
|
510
|
+
|
511
|
+
cropped_image = cropped_image.convert("L")
|
512
|
+
cropped_image = cropped_image.filter(ImageFilter.SHARPEN)
|
513
|
+
enhancer = ImageEnhance.Contrast(cropped_image)
|
514
|
+
cropped_image = enhancer.enhance(2.0)
|
515
|
+
|
516
|
+
captured_text = pytesseract.image_to_string(cropped_image)
|
517
|
+
console.print(f"Texto Full capturado {captured_text}...\n")
|
518
|
+
|
519
|
+
resultado = re.search(pattern_qtd_restante, captured_text)
|
520
|
+
if resultado:
|
521
|
+
break
|
522
|
+
|
506
523
|
await worker_sleep(2)
|
507
524
|
attempts += 1
|
508
525
|
|
@@ -521,13 +538,13 @@ async def entrada_de_notas_9(task: RpaProcessoEntradaDTO) -> RpaRetornoProcessoD
|
|
521
538
|
else:
|
522
539
|
return RpaRetornoProcessoDTO(
|
523
540
|
sucesso=False,
|
524
|
-
retorno=f"Não foi possivel obter o resultado da quantidade restante, texto extraido: {
|
541
|
+
retorno=f"Não foi possivel obter o resultado da quantidade restante, texto extraido: {captured_text}",
|
525
542
|
status=RpaHistoricoStatusEnum.Falha,
|
526
543
|
)
|
527
544
|
except Exception as e:
|
528
545
|
return RpaRetornoProcessoDTO(
|
529
546
|
sucesso=False,
|
530
|
-
retorno=f"Erro {e}, Não foi possivel obter o resultado da quantidade restante
|
547
|
+
retorno=f"Erro {e}, Não foi possivel obter o resultado da quantidade restante",
|
531
548
|
status=RpaHistoricoStatusEnum.Falha,
|
532
549
|
)
|
533
550
|
|
@@ -44,11 +44,11 @@ worker_automate_hub/tasks/jobs/entrada_de_notas_32.py,sha256=0cneKY6bQU5neo3TKlG
|
|
44
44
|
worker_automate_hub/tasks/jobs/entrada_de_notas_33.py,sha256=ktXc_kdMhlz9cbb7XjfMJhME29mgMFd_FnatxSZZU_s,31457
|
45
45
|
worker_automate_hub/tasks/jobs/entrada_de_notas_34.py,sha256=iaSmtWTWlazHDtGp22yTV5J5rHDhUCbEaCAnpU7UWyM,31808
|
46
46
|
worker_automate_hub/tasks/jobs/entrada_de_notas_36.py,sha256=vFkDcgJ9uxrMMLYdeONCMxh6_evnhgF1Sun5HEHAWa4,22716
|
47
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=
|
47
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_39.py,sha256=Kv1Ttgq477Xtp17QDymcOgWtuozFAexUqhcThPV9GTI,32767
|
48
48
|
worker_automate_hub/tasks/jobs/entrada_de_notas_500.py,sha256=MYPaYAP2iwdBYDZUf39f7yGibTME9uObEash_QTCmFA,32231
|
49
49
|
worker_automate_hub/tasks/jobs/entrada_de_notas_505.py,sha256=jIml8gjXPdI6_x7S9VVV8IrKZRF7_PTNOMnhNmYMDTU,14490
|
50
50
|
worker_automate_hub/tasks/jobs/entrada_de_notas_7139.py,sha256=8XP9G3n0PUeshbRWkWKOMnyUGRWspIolPZVqQTR3SMI,14184
|
51
|
-
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=
|
51
|
+
worker_automate_hub/tasks/jobs/entrada_de_notas_9.py,sha256=DMKw8Px8NtrNNAmBTAJ32sQ7fCZdF5zJno-X39c7Ubg,49548
|
52
52
|
worker_automate_hub/tasks/jobs/exemplo_processo.py,sha256=3-zxbb-9YHPmSA_K1Qgxp_FwSqg2QDjGBRCLxDZ8QoQ,3451
|
53
53
|
worker_automate_hub/tasks/jobs/fidc_gerar_nosso_numero.py,sha256=iXIKBMNFPj3L6G5Iq5nyDKiZT3NAP5sIhRSzYdURpNw,9571
|
54
54
|
worker_automate_hub/tasks/jobs/fidc_remessa_cobranca_cnab240.py,sha256=QBGm6eS5JghgNWNqZlk1g2a2iV8LnBLiOTBBL3Giet0,4181
|
@@ -67,7 +67,7 @@ worker_automate_hub/utils/updater.py,sha256=en2FCGhI8aZ-JNP3LQm64NJDc4awCNW7UhbV
|
|
67
67
|
worker_automate_hub/utils/util.py,sha256=YQkdPMCgrwuCJG_069p1cIG7xTg8VgvSHlGnIQrlyHo,119625
|
68
68
|
worker_automate_hub/utils/utils_nfe_entrada.py,sha256=yQFyDzvXPSO-UYV1m38WLJ3AWQgZYcyUkHZdCKE1jG4,28360
|
69
69
|
worker_automate_hub/worker.py,sha256=KDBU3L2kVobndrnN5coRZFTwVmBLKmPJjRv20sCo5Hc,4697
|
70
|
-
worker_automate_hub-0.4.
|
71
|
-
worker_automate_hub-0.4.
|
72
|
-
worker_automate_hub-0.4.
|
73
|
-
worker_automate_hub-0.4.
|
70
|
+
worker_automate_hub-0.4.420.dist-info/entry_points.txt,sha256=sddyhjx57I08RY8X7UxcTpdoOsWULAWNKN9Xr6pp_Kw,54
|
71
|
+
worker_automate_hub-0.4.420.dist-info/METADATA,sha256=CkRKnfgOsJFxDbtex9-kmsFfEbJPqDbrmyuR0ZzLGLw,2895
|
72
|
+
worker_automate_hub-0.4.420.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
73
|
+
worker_automate_hub-0.4.420.dist-info/RECORD,,
|
File without changes
|
{worker_automate_hub-0.4.418.dist-info → worker_automate_hub-0.4.420.dist-info}/entry_points.txt
RENAMED
File without changes
|