개정판 b6327fb2
print exception
DTI_PID/DTI_PID/azure_handwrite_ocr_module.py | ||
---|---|---|
189 | 189 |
|
190 | 190 |
return img |
191 | 191 |
|
192 |
except Exception as e: |
|
193 |
print('Error:') |
|
194 |
print(e) |
|
192 |
except Exception as ex: |
|
193 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
195 | 194 |
|
196 | 195 |
return img |
197 | 196 |
|
... | ... | |
337 | 336 |
|
338 | 337 |
return textInfoList |
339 | 338 |
|
340 |
except Exception as e: |
|
341 |
print('Error:') |
|
342 |
print(e) |
|
339 |
except Exception as ex: |
|
340 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
343 | 341 |
|
344 | 342 |
return None |
345 | 343 |
|
DTI_PID/DTI_PID/azure_ocr_module.py | ||
---|---|---|
1 |
#import httplib |
|
1 |
import sys |
|
2 |
import os |
|
2 | 3 |
import http.client |
3 | 4 |
import urllib |
4 | 5 |
import base64 |
... | ... | |
151 | 152 |
|
152 | 153 |
return (img, tInfo) |
153 | 154 |
|
154 |
except Exception as e: |
|
155 |
print('Error:') |
|
156 |
print(e) |
|
155 |
except Exception as ex: |
|
156 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
157 | 157 |
|
158 | 158 |
return (img, tInfo) |
159 | 159 |
|
... | ... | |
239 | 239 |
|
240 | 240 |
return textInfoList |
241 | 241 |
|
242 |
except Exception as e: |
|
243 |
print('Error:') |
|
244 |
print(e) |
|
242 |
except Exception as ex: |
|
243 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
245 | 244 |
|
246 | 245 |
return None |
내보내기 Unified diff