Hi I am testing the API request for web app as per the doc: https://docs.cleartax.in/cleartax-for-developers/e-invoicing-api/e-invoicing-api-reference/cleartax-e-invoicing-apis-xml-schema
Request URL: https://einvoicing.internal.cleartax.co/v2/eInvoice/generate Request Method: PUT
I am getting below error:
2021-08-07 13:30:49,634: Exception on /upload [POST]
Traceback (most recent call last):
File "/home/santoshmohan04/.virtualenvs/einvoice/lib/python3.6/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/home/santoshmohan04/.virtualenvs/einvoice/lib/python3.6/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/santoshmohan04/.virtualenvs/einvoice/lib/python3.6/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/santoshmohan04/.virtualenvs/einvoice/lib/python3.6/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/santoshmohan04/einvoice/einvoice.py", line 55, in uploadFile
url = "https://einvoicing.internal.cleartax.co/v2/eInvoice/generate"
File "/usr/local/lib/python3.6/http/client.py", line 1287, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1333, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1282, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1042, in _send_output
self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 980, in send
self.connect()
File "/usr/local/lib/python3.6/http/client.py", line 1440, in connect
super().connect()
File "/usr/local/lib/python3.6/http/client.py", line 952, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
kindly help me to test the api and build the app.
[edit by admin: formatting]