Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expecting value: line 1 column 1 (char 0) #2547

Open
1 task done
njbhatt18 opened this issue Dec 24, 2024 · 0 comments
Open
1 task done

Expecting value: line 1 column 1 (char 0) #2547

njbhatt18 opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@njbhatt18
Copy link

Information about bug

Reported Error In Leave Module

Module

HR

Version

ERPNext: v15.46.2 (version-15)
Frappe Framework: v15.50.1 (version-15)
Frappe HR: v15.36.1 (version-15)
India Compliance: v15.14.6 (version-15)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

Traceback with variables (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
      request = <Request 'https://erp.techseria.com/api/method/hrms.hr.doctype.leave_application.leave_application.get_events?doctype=Leave%20Application&start=2024-11-25%2000:00:00&end=2025-01-06%2000:00:00&filters=`["Leave%20Application","name","=","HR-EMP-00010"]`&field_map={"start":"from_date","end":"to_date","id":"name","title":"title","docstatus":1,"color":"color"}' [GET]>
      response = None
      rollback = True
      e = JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
      request = <Request 'https://erp.techseria.com/api/method/hrms.hr.doctype.leave_application.leave_application.get_events?doctype=Leave%20Application&start=2024-11-25%2000:00:00&end=2025-01-06%2000:00:00&filters=`["Leave%20Application","name","=","HR-EMP-00010"]`&field_map={"start":"from_date","end":"to_date","id":"name","title":"title","docstatus":1,"color":"color"}' [GET]>
      endpoint = <function handle_rpc_call at 0xf52d27420d60>
      arguments = {'method': 'hrms.hr.doctype.leave_application.leave_application.get_events'}
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
      method = 'hrms.hr.doctype.leave_application.leave_application.get_events'
      frappe = <module 'frappe' from 'apps/frappe/frappe/__init__.py'>
  File "apps/frappe/frappe/handler.py", line 50, in handle
    data = execute_cmd(cmd)
      cmd = 'hrms.hr.doctype.leave_application.leave_application.get_events'
      data = None
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
      cmd = 'hrms.hr.doctype.leave_application.leave_application.get_events'
      from_async = False
      server_script = None
      method = <function get_events at 0xf52d2553e160>
  File "apps/frappe/frappe/__init__.py", line 1726, in call
    return fn(*args, **newargs)
      fn = <function get_events at 0xf52d2553e160>
      args = ()
      kwargs = {'doctype': 'Leave Application', 'start': '2024-11-25 00:00:00', 'end': '2025-01-06 00:00:00', 'filters': '`["Leave Application","name","=","HR-EMP-00010"]`', 'field_map': '{"start":"from_date","end":"to_date","id":"name","title":"title","docstatus":1,"color":"color"}', 'cmd': 'hrms.hr.doctype.leave_application.leave_application.get_events'}
      newargs = {'start': '2024-11-25 00:00:00', 'end': '2025-01-06 00:00:00', 'filters': '`["Leave Application","name","=","HR-EMP-00010"]`'}
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
      args = ()
      kwargs = {'start': '2024-11-25 00:00:00', 'end': '2025-01-06 00:00:00', 'filters': '`["Leave Application","name","=","HR-EMP-00010"]`'}
      apply_condition = <function whitelist.<locals>.innerfn.<locals>.<lambda> at 0xf52d2553e0c0>
      func = <function get_events at 0xf52d2553e020>
  File "apps/hrms/hrms/hr/doctype/leave_application/leave_application.py", line 1181, in get_events
    filters = json.loads(filters)
      start = '2024-11-25 00:00:00'
      end = '2025-01-06 00:00:00'
      filters = '`["Leave Application","name","=","HR-EMP-00010"]`'
      json = <module 'json' from '/usr/lib/python3.11/json/__init__.py'>
  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
      s = '`["Leave Application","name","=","HR-EMP-00010"]`'
      cls = None
      object_hook = None
      parse_float = None
      parse_int = None
      parse_constant = None
      object_pairs_hook = None
      kw = {}
  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      self = <json.decoder.JSONDecoder object at 0xf52d29494350>
      s = '`["Leave Application","name","=","HR-EMP-00010"]`'
      _w = <built-in method match of re.Pattern object at 0xf52d297728e0>
  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
      self = <json.decoder.JSONDecoder object at 0xf52d29494350>
      s = '`["Leave Application","name","=","HR-EMP-00010"]`'
      idx = 0
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@njbhatt18 njbhatt18 added the bug Something isn't working label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant