python 2.5 on Macintosh

Issue #1 resolved
Anonymous created an issue

Hi Tim,

I'm using pyton 2.5 on Mac OS 10.5.8 and get the following:

rod$ python ../ Warning: 'with' will become a reserved keyword in Python 2.6 Traceback (most recent call last): File "", line 48, in <module> import harvest File "../", line 219 with open(error_file, 'w') as efile: ^ SyntaxError: invalid syntax

I'm not a python expert, and updating python in this environment isn't an option. Any ideas?


Comments (1)

  1. Tim Sherratt repo owner

    Hi Rod,

    I've made some changes and as far as I can tell (testing on Linux) it should work with 2.5 now. However, you'll need to have the SimpleJSON module installed. If that's a problem let me know (it's actually not essential to the harvester, but used by other parts of the scraper).

    The 'with' problem was easy to fix, just had to add:

    from future import with_statement

    But then I discovered some problems with the Zip module...

    Anyway, give it a try now and let me know how it goes. I've included a zip of the new version in the downloads section.

    cheers, Tim

  2. Log in to comment