flobosg/impressive-presenter

I cannot make it work :(

Closed this issue · 7 comments

Nice idea. Unfortunately it doesn't work for me.

I run the script and the files get created. Then I start the browser (I tried with chromium 39 using the flag for file access, and also with firefox 34) and the timer starts counting.

Then I start impressive but unfortunately the html view never updates :(

I just tested it with Firefox 34, and worked as usual. It would help if you inspect these things:

  • When you start Impressive, a json.txt file gets made. Check out if its contents are updated (specially current_page) when you change slides.
  • Look the Javascript console of Chromium or Firefox when the presenter is loaded. Any Javascript error or warning should appear there.

Thanks for posting, and let me know if you find something!

Thanks a lot for help!

I have tried on other PC, but when I run the script, it shows an error. Maybe I'm missing a python module:

$ ./impressive-presenter.sh slides-jaf.pdf
Generating slide previews...
Generating .info file...
Traceback (most recent call last):
File "./makeinfo.py", line 2, in
from pyPdf import PdfFileReader
ImportError: No module named 'pyPdf'
Copying presenter.html...
cp: './presenter.html' and './presenter.html' are the same file
Copying jquery-1.3.2.min.js...
cp: './jquery-1.3.2.min.js' and './jquery-1.3.2.min.js' are the same file

And when I start impressive, no json file gets created.

Maybe the error was shown at my home PC (the one I used to try it the first time) and I didn't notice. I hope I can try it again when I arrive home.

I have tried installing pypdf and now I get other error:

$ ./impressive-presenter.sh slides-jaf.pdf
Emptying previews directory...
Generating slide previews...
Generating .info file...
Traceback (most recent call last):
File "./makeinfo.py", line 7, in
document = PdfFileReader(file(filename, "rb"))
NameError: name 'file' is not defined
Copying presenter.html...
cp: './presenter.html' and './presenter.html' are the same file
Copying jquery-1.3.2.min.js...
cp: './jquery-1.3.2.min.js' and './jquery-1.3.2.min.js' are the same file

OK, now it's working like a charm.

There were two problems. The first one is I was missing pypdf. The second problem is that your python script is for python2, and ArchLinux defaults to python3.

So I had to install python2-pypdf and then change the invocation to makeinfo.py in the script. I replaced "python $SCRIPTDIR/makeinfo.py $1" with "python2 $SCRIPTDIR/makeinfo.py $1" and now it works perfect!

It's really nice, i like it a lot! Thanks!

Unfortunately I have another problem. I got it working nicely under GNU/Linux, but my talk slides will be displayed using a Windows machine. I have tried it on a windows PC, using win32 version of Impressive, and it fails when trying to create the json file:

Impressive.exe -t None slides.pdf
Welcome to Impressive version 0.10.5
Detected screen size: 1366x768 pixels
slides.pdf.info:9: Warning: 'with' will become a reserved keyword in Python 2.6
----- Exception in info script ----
Traceback (most recent call last):
File "", line 2170, in LoadInfoScript
File "C:\Users\Usuario\Desktop\defensa\slides.pdf.info", line 9
with open('json.txt', 'w') as io:
^
SyntaxError: invalid syntax
----- End of traceback -----

Could this maybe be solved changing anything in the info script? Unfortunately I know almost nothing about Python and json :(

Apparently, the Windows version was compiled with a Python version that doesn't support the with statement.

In the .info file replace these lines

    with open('test/json.txt', 'w') as io:
        json.dump(({"page_count": PageCount, "current_page": Pcurrent, "previous_page": Pnext, "start_time": StartTime, "pageenter_time": PageEnterTime, "current_time": CurrentTime, "notes": PageProps[Pcurrent]['notes']}), io)

with this

    io = open('test/json.txt', 'w')
    json.dump(({"page_count": PageCount, "current_page": Pcurrent, "previous_page": Pnext, "start_time": StartTime, "pageenter_time": PageEnterTime, "current_time": CurrentTime, "notes": PageProps[Pcurrent]['notes']}), io)
    io.close()

Thanks a whole lot for help. Unfortunately it looks like it will be impossible to make it work under Windows, because the python implementation it has lacks json packages:

----- Exception in info script ----
Traceback (most recent call last):
File "", line 2170, in LoadInfoScript
File "C:\Users\Usuario\Desktop\defensa\slides.pdf.info", line 1, in
import json
File "C:\Program Files (x86)\Dev\Python25\pyinstaller-2.0\PyInstaller\loader\i
u.py", line 409, in importHook
ImportError: No module named json
----- End of traceback -----