Of course, by this time you already know that if the error message says line 2, the error is probably in line 1. The error being generated here is very cryptic and has little to do with the actual problem. In order to understand why the message mentions methods and packages, you need to understand the different, arcane ways you can invoke methods when programming with objects. You probably need to add a beginning quote if you ever see this error message. Errors are not always located on the line mentioned in the error message.
Errors frequently have nothing to do with the error message displayed.