Closed tylerlong closed 12 months ago
As a temporary workaround, please use https://github.com/tylerlong/ringcentral-python
In Python 3.x and modern versions of Python 2.x use except Exception as e instead of except Exception, e: PR #62
@tylerlong I have created a Demo code and we are able to send and receive Fax. demo_fax.py #64 https://github.com/ringcentral/ringcentral-python/pull/64
Issue below is reported by a developer:
This is the code where the issue begins:
...
attachment = ('fax.jpg', open('fax.jpg','r').read(), 'image/jpeg') builder.add(attachment)
...
This is the error that I get when I attach a document:
File "/home/username/Projects/project-paths/fax.py", line 71, in send_fax resp = platform.send_request(request) File "/home/username/.local/lib/python3.9/site-packages/ringcentral/platform/platform.py", line 173, in send_request return self._client.send(self.inflate_request(request, skip_auth_check=skip_auth_check)) File "/home/username/.local/lib/python3.9/site-packages/ringcentral/http/client.py", line 34, in send raise ApiException(response, e) File "/home/username/.local/lib/python3.9/site-packages/ringcentral/http/api_exception.py", line 14, in init if api_response.error(): File "/home/username/.local/lib/python3.9/site-packages/ringcentral/http/api_response.py", line 77, in error message = message + ' (and additional error happened during JSON parse: ' + e.message + ')' AttributeError: 'Exception' object has no attribute 'message'