Runtime error in Plot() - parameter name mixup?

Bug #1841477 reported by Rickard Westman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GASP Core
New
Undecided
Unassigned
python-gasp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Calls to Plot() seem to cause a runtime error:

  Python 2.7.15+ (default, Nov 27 2018, 23:36:35)
  [GCC 7.3.0] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> from gasp import *
  >>>
  >>> begin_graphics(100, 100)
  >>> Plot((50, 50))
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.7/dist-packages/gasp/api.py", line 176, in __init__
      except: raise backend.GaspException("center is not in (x,y) format")
  gasp.backend.GaspException: 'center is not in (x,y) format'

Looking at line 176, there seems to be a mismatch between the reference to "center" and the actual name of the __init__ method parameter, which is "pos". Fixing this (patch attached) does seem to make things work.

Additional info as per reporting guidelines:

lsb-release -rd:
  Description: Ubuntu 18.04.3 LTS
  Release: 18.04

apt-cache policy python-gasp:
  python-gasp:
    Installed: 0.3.4-2
    Candidate: 0.3.4-2
    Version table:
   *** 0.3.4-2 500
          500 http://se.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
          500 http://se.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
          100 /var/lib/dpkg/status

What I expected to happen: Not getting a runtime error, since I believe the invocation of Plot() is correct.

What happened instead: Got a runtime error.

Revision history for this message
Rickard Westman (rwestman) wrote :
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.