Compiling documents fails: Encoding Pragma is no longer supported (Bug #565)


Added by Manuel Sch over 6 years ago. Updated over 4 years ago.


Status:Closed Start date:05/23/2018
Priority:High Due date:
Assignee:- % Done:

100%

Category:-
Target version:- Estimated time:0.30 hour

Description

The compilation does not work anymore. I am on ArchLinux. The error message is as follows:

 $ auto-multiple-choice       # then clicking on compilation in the GUI 
 The encoding pragma is no longer supported at /usr/lib/AMC/perl/AMC-prepare.pl line 21.
 BEGIN failed--compilation aborted at /usr/lib/AMC/perl/AMC-prepare.pl line 21.

Can be fixed by changing the appropriate lines in the code:

sudo sed -i 's/use encoding "utf-8";/use utf8;/' /usr/lib/AMC/perl/*.pl
sudo sed -i "s/use encoding 'utf8'/use utf8/g" /usr/share/perl5/vendor_perl/AMC/*.pm

This replaces the calls `use encoding "utf-8"` with `use utf8`. The changes should to be integrated in ACM soon, s.t. users without knowledge of the command line can still use ACM. I am unsure which files to change though.


History

Updated by Alexis Bienvenüe over 6 years ago

Thanks for the report. These changes were applied in git:43eadf65. Maybe you can switch to the development version (or 1.4.0~beta1).

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Updated by Manuel Sch over 6 years ago

Alexis Bienvenüe wrote:

Thanks for the report. These changes were applied in git:43eadf65. Maybe you can switch to the development version (or 1.4.0~beta1).

Hi Alexis, thanks for the answer. I cannot get the git version of AMC compiled because of docbook.sty not being found. I do have dblatex installed which includes docbook.sty (https://www.archlinux.org/packages/community/any/dblatex/files/). I am on ArchLinux. Am I missing something here?

$ make
...
(/usr/share/texmf-dist/tex/latex/cmap/cmap.sty

Package cmap Warning: pdftex not detected - exiting.

) (./amcdocstyle.sty

! LaTeX Error: File `docbook.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

l.23 \RequirePackage
                    [USenglish]{isodate}^^M
No pages of output.
Transcript written on auto-multiple-choice.fr.log.
make[1]: *** [Makefile:71: auto-multiple-choice.fr.pdf] Error 1
rm img_pdf/warning.pdf img_pdf/note.pdf img_pdf/important.pdf auto-multiple-choice.fr.tex
make[1]: Leaving directory '/home/schnecki/Documents/teaching/klausur/auto-multiple-choice/doc'
make: *** [Makefile:157: doc] Error 2

Updated by Alexis Bienvenüe over 6 years ago

Maybe you can start from a "dist" archive, where the documentation is already generated: this should be less tricky.
Latest version (from the tags page): https://gitlab.com/jojo_boulix/auto-multiple-choice/uploads/752bcd6a19915b66683330840e7e627b/auto-multiple-choice_1.4.0-beta2_dist.tar.gz

Updated by Manuel Sch over 6 years ago

Ok this seems to work. However, the data capture does not working. All boxes are ticked when I automatically added photocopies. When I look at the scan manually I can switch between scan and original. In the original every box is ticked, while when I look at the scan then I see the correct photocopied sheet by the student. Of course I checked the layout, and there the boxes were correctly detected.

Might this have anything to do with the compilation (which takes just a second or so)?

Updated by Alexis Bienvenüe over 6 years ago

What can you see in the "zooms" window?
What is the value of Preferences/Project/Automatic data capture/Darkness threshold?

Updated by Manuel Sch over 6 years ago

Alexis Bienvenüe wrote:

What can you see in the "zooms" window?

There are no boxes. Its just grey (background color). So the boxes weren't found and extracted in the analyzing process, I guess.

What is the value of Preferences/Project/Automatic data capture/Darkness threshold?

The threshold is 0.15. Upper threshold 0.75.

Btw, the about page sys it's AMC 1.3.0, whereas I used the 1.4.0 beta download. That's just not updated yet, right?

Updated by Alexis Bienvenüe over 6 years ago

Btw, the about page says it's AMC 1.3.0, whereas I used the 1.4.0 beta download. That's just not updated yet, right?

The about page should mention the right version.
Did the install work properly after the build?

Updated by Manuel Sch over 6 years ago

Alexis Bienvenüe wrote:

Btw, the about page says it's AMC 1.3.0, whereas I used the 1.4.0 beta download. That's just not updated yet, right?

The about page should mention the right version.
Did the install work properly after the build?

Ah I started the "binary" in the folder with ./auto-multiple-choice. Just figured this is not a binary but rather a script :) After installing I got

Can't locate Gtk3.pm in @INC (you may need to install the Gtk3 module) (@INC contains: /usr/lib/perl5/5.26/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.26/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.26/core_perl /usr/share/perl5/core_perl) at /usr/lib/AMC/perl/AMC-gui.pl line 23.
BEGIN failed--compilation aborted at /usr/lib/AMC/perl/AMC-gui.pl line 23.

Meaning I missed the library perl-gtk3. It seems to work now.

Nice interface, and thank you very much.

Manuel

Updated by Manuel Sch over 6 years ago

P.S.: And perl-clone

Updated by Manuel Sch over 4 years ago

PPS.: one can compile it by ignoring the documentation build. Just edit the file `doc/Makefile` by changing the `all:` directive to:

# all: $(SELECTED_DOCBOOKS:.xml=.pdf) $(SELECTED_DOCBOOKS:.xml=.x) $(IMAGES:.svg=.png) $(MODELS:.d=.tgz) html/index.html;
all:

Also available in: Atom PDF