#16 ✓resolved
seb

TypeError: bad argument type for built-in operation

Reported by seb | May 18th, 2009 @ 12:32 PM

I added this test to test/test-object.py:

@t.cx() def test_array_access(cx):

cx.add_global("test", [1, 2, 3])
t.eq(cx.execute("test[0]"), 1)

It fails with this error:

======================================================================

ERROR: test-object.test_array_access

Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/nose-0.10.4-py2.5.egg/nose/case.py", line 182, in runTest

self.test(*self.arg)

File "/usr/lib/python2.5/site-packages/nose-0.10.4-py2.5.egg/nose/util.py", line 596, in newfunc

return func(*arg, **kw)

File "/home/seb/tmp/python-spidermonkey/tests/t.py", line 12, in run

func(*self.args())

File "/home/seb/tmp/python-spidermonkey/tests/test-object.py", line 83, in test_array_access

t.eq(cx.execute("test[0]"), 1)

TypeError: bad argument type for built-in operation


Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Python/JavaScript bridge module, making use of Mozilla's spidermonkey JavaScript implementation. Allows implementation of JavaScript classes, objects and functions in Python, and evaluation and calling of JavaScript scripts and functions respectively. Borrows heavily from Claes Jacobssen's Javascript Perl module, in turn based on Mozilla's 'PerlConnect' Perl binding.

People watching this ticket

Referenced by

Pages