impressive icon indicating copy to clipboard operation
impressive copied to clipboard

Throws exception on start up

Open githubnemo opened this issue 14 years ago • 5 comments

On freshly cloned master branch:

$ ./impressive.py slides.pdf
Welcome to Impressive (dual head) version 0.10.2
before detecting screen size
True True
Traceback (most recent call last):
  File "./impressive.py", line 4214, in 
    run_main()
  File "./impressive.py", line 3739, in run_main
    main()
  File "./impressive.py", line 3424, in main
    size = GetScreenSize()
  File "./impressive.py", line 148, in GetScreenSize
    return ProjectionFrame.size()
NameError: global name 'ProjectionFrame' is not defined

githubnemo avatar Dec 09 '11 00:12 githubnemo

Hi,

could you tell me, which linux distribution do you use, so I can investigate the problem for you?

If debian/Ubuntu please also provide the exact version

$ cat /etc/lsb-release

Please also provide the output of the

$ xrandr

Best Regards,

Vladimir

geekq avatar Dec 11 '11 10:12 geekq

It doesn't seem to have something to do with my distribution or xrandr version but the indentation of your additions, as far as I can see.

It seems that you mix tabs into otherwise white space indented code.

Example (lines 146-150)

    def GetScreenSize(): # indented by whitespace
    if True: # HACK: DualHead is not set at this point # indented by tab
        return ProjectionFrame.size()

        res_re = re.compile(r'\s*(\d+)x(\d+)\s+\d+\.\d+\*')

githubnemo avatar Dec 17 '11 02:12 githubnemo

I have the same problem: $ ./impressive.py demo.pdf Welcome to Impressive (dual head) version 0.10.2 before detecting screen size True True Traceback (most recent call last): File "./impressive.py", line 4214, in run_main() File "./impressive.py", line 3739, in run_main main() File "./impressive.py", line 3424, in main size = GetScreenSize() File "./impressive.py", line 148, in GetScreenSize return ProjectionFrame.size() NameError: global name 'ProjectionFrame' is not defined

Here is the info of my OS: $cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=15.04 DISTRIB_CODENAME=vivid DISTRIB_DESCRIPTION="Ubuntu 15.04" NAME="Ubuntu" VERSION="15.04 (Vivid Vervet)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 15.04" VERSION_ID="15.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

and here the output for xrandr: $xrandr Screen 0: minimum 8 x 8, current 2806 x 900, maximum 16384 x 16384 LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm 1366x768 60.1_+ 1360x768 59.8 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
DP1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) VGA1 connected 1440x900+1366+0 (normal left inverted right x axis y axis) 408mm x 255mm 1440x900 59.9_+ 75.0
1400x1050 60.0
1280x1024 75.0 60.0
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

dragonxtek avatar Aug 21 '15 21:08 dragonxtek

I can reproduce it! Will check...

geekq avatar Aug 22 '15 10:08 geekq

In the mean time:

  1. if you do not need dual-head functionality, please use the orginial 'impressive' implementation

  2. if you need dual-head, please provide parameters as described in README. Based on your xrandr output xrandr | grep ' connected':

    LVDS1 connected primary 1366x768+0+0
    VGA1 connected 1440x900+1366+0
    

I would try:

    ./impressive.py -t None --dual-head 1440x900+1366+0,1366x768+0+0 demo.pdf'

geekq avatar Aug 22 '15 14:08 geekq