Hi, you found yet another place where I forgot to update imports. Simply replace the line with "import sdaps.annotate as annotate" (ie. remove one ".annotate") and it will work.
Though you are only hitting the code because something goes wrong in the setup routine. So you probably have a small issue in your ODT file, or LibreOffice has changed the PDF file creation again, and SDAPS stopped working because of that. Regards, Benjamin On Mi, 2014-08-06 at 15:45 +0000, Paul Hinds wrote: > I’ve recently ungraded to 1.1.4 and I think I have hit a dependency > issue. > > > > I’m trying to run: > > sdaps project setup --print-questionnaire-id --print-survey-id > questionnaire.odt questionnaire.pdf > > > > and I’m getting the following: > > > > ------------------------------------ > > If the dependencies for the "annotate" command are installed, then an > annotated version will be created next to the original PDF file. > > ------------------------------------ > > Traceback (most recent call last): > > File "/usr/bin/sdaps", line 23, in <module> > > sys.exit(sdaps.main()) > > File "/usr/lib/python2.7/dist-packages/sdaps/__init__.py", line 64, > in main > > return cmdline['_func'](cmdline) > > File "/usr/lib/python2.7/dist-packages/sdaps/cmdline/setup.py", line > 94, in setup > > return setupodt.setup(survey, cmdline['questionnaire.odt'], > cmdline['questionnaire.pdf'], cmdline['additional_questions'], > cmdline) > > File "/usr/lib/python2.7/dist-packages/sdaps/setupodt/__init__.py", > line 103, in setup > > import sdaps.annotate.annotate as annotate > > ImportError: No module named annotate > > > > This seems to be a new one as this is the first time we have run it > since the upgrade. I’ve removed sdaps and then reinstalled it with all > the suggested dependencies (the first time round I had an unresolved > poppler dependency, but doing this solved that). Does anyone ahve any > ideas what I am missing or would a removal and manual install be the > better way to go rather than using the package. > > > > Best Wishes & Many Thanks > > > > Paul > > > > > > __This e-mail and any attached files is intended to be read by the > addressee only, as it may contain legally privileged or confidential > information and, as such, it is not intended to be relied upon by any > person without subsequent written confirmation of its contents. > > If you are not the intended recipient, please note that any form of > distribution, retransmission, disclosure, reproduction or publication > is prohibited and may be unlawful. If you have received this e-mail in > error, please delete it from your system and notify the sender as soon > as possible. Thank you. > > No responsibility is accepted by F Hinds and its associated companies > for the contents of personal e-mails or for e-mails unconnected with > the group's business. F.Hinds has the facility to monitor and read > both incoming and outgoing communications by e-mail. > F.Hinds Ltd 24 Park Road Uxbridge Middlesex. UB8 1NH > VAT No: 792 2990 87 Registered in London No: 149328 > > ____________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud > service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________
From 9b53ee3a641abe3b7f2c8970803174182f511d5a Mon Sep 17 00:00:00 2001 From: Benjamin Berg <[email protected]> Date: Wed, 6 Aug 2014 18:49:44 +0200 Subject: [PATCH] Fix import of annotate module in setupodt. --- sdaps/setupodt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdaps/setupodt/__init__.py b/sdaps/setupodt/__init__.py index bddbf94..0feb35d 100644 --- a/sdaps/setupodt/__init__.py +++ b/sdaps/setupodt/__init__.py @@ -100,7 +100,7 @@ def setup(survey, questionnaire_odt, questionnaire_pdf, additionalqobjects, opti # No .pdf ending? Just append the _annotated.pdf. annotated_pdf = questionnaire_pdf + '_annotated.pdf' - import sdaps.annotate.annotate as annotate + import sdaps.annotate as annotate annotate.annotate(survey, questionnaire_pdf, annotated_pdf) except: # Well, whatever -- 2.0.1
signature.asc
Description: This is a digitally signed message part
