-
Notifications
You must be signed in to change notification settings - Fork 310
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
Error in Python Client; #488
Comments
Hello @spencerR1992, We will look at it and come back to you when solved. |
Hello @spencerR1992 , There are 2 errors in lines 150 and 151 of parsr_client.py You can replace this lines by: It should solve you problem. Regards |
Relevant: #490 (comment) |
After instlling from PIP on 21.05.2021, I found this to still be an issue when running from the command line. |
It would be nice if you published a new release to PyPI that incorporates this fix. |
Summary
When using param 'wait_till_finished' on ParsClient, error raised
`---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in
----> 1 res = parsr.send_document(
2 file_path="BariatricSurgery.pdf",
3 config_path='defaultConfig.json',
4 document_name='The Readme',
5 refresh_period = 5, silent = False,
/usr/local/lib/python3.8/site-packages/parsr_client/parsr_client.py in send_document(self, file_path, config_path, server, document_name, revision, wait_till_finished, refresh_period, save_request_id, silent)
148 print('>> Job done!')
149 return {
--> 150 'file': file,
151 'config': config,
152 'status_code': r.status_code,
NameError: name 'file' is not defined`
Looks like there's conflation between
file_path
andfile
in thatsend_document(
functionSteps To Reproduce
Steps to reproduce the behavior:
pip install parsr-client
#python res = parsr.send_document( file_path="mydocument.pdf", config_path='defaultConfig.json', document_name='The Readme', refresh_period = 5, silent = False, save_request_id=True, wait_till_finished = True)
Expected behavior
Return of object with reference to json, xml, and other attributes
Actual behavior
A error
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
The text was updated successfully, but these errors were encountered: