Skip to content
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

Analyse pdf generation #6

Open
jack-parsons opened this issue Aug 27, 2019 · 4 comments
Open

Analyse pdf generation #6

jack-parsons opened this issue Aug 27, 2019 · 4 comments
Assignees
Labels

Comments

@jack-parsons
Copy link
Member

File prompt to change save location

@jack-parsons jack-parsons self-assigned this Aug 27, 2019
@jack-parsons
Copy link
Member Author

@JoshuaSteer do we need to be able to pick a reference point for this to work?

@JoshuaSteer
Copy link
Member

Probably, again this is where I'm not exactly sure how the code works

@jack-parsons jack-parsons added this to the Ready for presentation milestone Sep 6, 2019
@jack-parsons
Copy link
Member Author

AmpScan MeasurementsOut method doesn't work when installed using pip

Traceback (most recent call last):
File "C:\Users\Jack\Documents\GitHub\ampscan_webapp\pvenv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\Jack\Documents\GitHub\ampscan_webapp\pvenv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\Jack\Documents\GitHub\ampscan_webapp\pvenv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Jack\Documents\GitHub\ampscan_webapp\test_app\views.py", line 315, in measurements_view
analyse.MeasurementsOut(obj, point)
File "C:\Users\Jack\Documents\GitHub\ampscan_webapp\pvenv\lib\site-packages\AmpScan\analyse.py", line 472, in MeasurementsOut
return getPDF(lngth, perimeter, PolyArea, APWidth, MLWidth) # PDF Creation function (in output.py)
File "C:\Users\Jack\Documents\GitHub\ampscan_webapp\pvenv\lib\site-packages\AmpScan\output.py", line 44, in getPDF
template = PdfFileReader(open(os.path.join("res", "Measurements Template.pdf"), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'res\Measurements Template.pdf'

@JoshuaSteer
Copy link
Member

Think that should be template = PdfFileReader(open(os.path.join("res", "Measurements Template.pdf"), "wb")) not 'rb'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants