Sublime Forum

Getting a signature mismatch when I don't think I should

#1

Hi, I’m trying to use the Python features and I’m coming across some things that don’t seem right. In the console:

>>> view.size()
9997L
>>> view.line(159L, 15L)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
    View.line(View, long, long)
did not match C++ signature:
    line(SP<TextBufferView>, SelectionRegion)
    line(SP<TextBufferView>, long long)

Line 159 and column 15 are valid in the text file I’m playing with.

I’m running on OSX 10.7.5, and I think I’m running Python 2.7.1 - at least that’s the default one that runs in my terminal.

I would certainly appreciate any pointers. Thanks in advance.

–Dean

0 Likes

#2

The two acceptable signatures are listed in the error:

line(SP<TextBufferView>, SelectionRegion) line(SP<TextBufferView>, long long)
You have to call it with a text point, not with a row and column.

0 Likes