It was working fine but suddenly module "gasp" has stopped working and gives this error :
choose between a, b and c : b
function_b was called...
Traceback (most recent call last):
File "pitch.py", line 1, in <module>
from gasp import *
File "/usr/lib/python2.7/site-packages/gasp/__init__.py", line 15, in <module>
from api import *
File "/usr/lib/python2.7/site-packages/gasp/api.py", line 26, in <module>
import backend
File "/usr/lib/python2.7/site-packages/gasp/backend.py", line 27, in <module>
import gobject
File "/usr/lib/python2.7/site-packages/gobject/__init__.py", line 26, in <module>
from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
File "/usr/lib/python2.7/site-packages/glib/option.py", line 33, in <module>
import optparse
File "/usr/lib/python2.7/optparse.py", line 77, in <module>
import textwrap
File "/usr/lib/python2.7/textwrap.py", line 40, in <module>
class TextWrapper:
File "/usr/lib/python2.7/textwrap.py", line 82, in TextWrapper
whitespace_trans = string.maketrans(_whitespace, ' ' * len(_whitespace))
AttributeError: 'module' object has no attribute 'maketrans'
Note that my program doesn't asks to chose between "a, b and c" but still the console here asks and after entering a choice error message is presented.
for example a sample program using gasp is :
from gasp import *
begin_graphics(width = 800, height = 600, title = "A Window", background = color.RED)
Circle((200, 200), 60)
Line((100, 400), (580, 200))
x = Box((400, 350), 120, 100, thickness =1, filled = True)
Circle((10, 400), 2)
Image("/user/Pictures/xyz.jpg", (110, 90), width = 200, height = 160)
move_to(x, (100, 100))
#remove_from_screen(x)
update_when('key_pressed')
end_graphics()
It used to work fine but now doesn't and this is the case with every program using gasp module.
Oh and I am using python 2.7.8 on a Linux machine.