2
from ast import Call
from calendar import c
import json
from subprocess import call
import requests
with open('PS C:\Users\JUANCELY\Desktop\Prueba_Tecnica_JuanDavidCelyCaro\> <venv>\CodePTJDCC.py", ','r') as j:
    Clientes_Visitas_Mostrador = Call(j).content
    Clientes = json.loads(Clientes_Visitas_Mostrador)
    print(Clientes.keys())
    idusers = Clientes.keys()

Este es el error:

Traceback (most recent call last):
  File "C:\Users\JUANCELY\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\JUANCELY\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "c:\Users\JUANCELY\.vscode\extensions\ms-python.python-2022.6.3\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
    cli.main()
  File "c:\Users\JUANCELY\.vscode\extensions\ms-python.python-2022.6.3\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
    run()
  File "c:\Users\JUANCELY\.vscode\extensions\ms-python.python-2022.6.3\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 285, in run_file
    runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "C:\Users\JUANCELY\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 267, in run_path
    code, fname = _get_code_from_file(run_name, path_name)
  File "C:\Users\JUANCELY\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 242, in _get_code_from_file
    code = compile(f.read(), fname, 'exec')
  File "c:\Users\JUANCELY\Desktop\Prueba_Tecnica_JuanDavidCelyCaro\venv\CodePTJDCC.py", line 6    with open('PS C:\Users\JUANCELY\Desktop\Prueba_Tecnica_JuanDavidCelyCaro\> <venv>\CodePTJDCC.py", ','r') as j:

         ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 5-6: truncated \UXXXXXXXX escape
PS C:\Users\JUANCELY\Desktop\Prueba_Tecnica_JuanDavidCelyCaro>

Estoy tratando de leer un archivo json en python con el código que aparece arriba, pero me sale este error y no encuentro la forma de solucionarlo

Les agradezco su ayuda lo más pronto posible

2

0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

Examina otras preguntas con la etiqueta o formula tu propia pregunta.