Hi everyone!
I first use Aspose to convert .dwg file to .png file by python SDK. But it can’t work and throw ApiException as following, and I doubt that error file path cause it.
raise ApiException(
asposecadcloud.rest.ApiException: ('404 Error connecting to the API https://api.aspose.cloud/v3.0/cad/HPB11.dwg/saveAs/png; Message: Not Found', 404, {'code': 'errorItemNotFound',
'description': 'Operation Failed. Item Not Found.',
'inner_error': None,
'message': 'The storage myStorage was not found or is not associated with the '
'application.'})
My code as follows.
import os
from asposecadcloud import CadApi
import asposecadcloud.models.requests as requests
app_sid = 'xxx'
app_key = 'xxx'
base_url = 'https://api.aspose.cloud/'
api_version = 'v3.0'
cad_api = CadApi(app_key=app_key, app_sid=app_sid, base_url=base_url, api_version=api_version)
request = requests.GetDrawingSaveAsRequest(name='HPB11.dwg', output_format='png', folder='./input/HPB11.dwg', out_path='./output/HPB11.png', storage='myStorage')
cad_api.get_drawing_save_as(request=request)
My storage layout as follows.
Could I trouble you to solve the above problem? Thanks!
storage2.png (19.3 KB)
storage1.png (16.9 KB)