EnigmaCurry/blogofile

Python 2.6: TypeError: integer argument expected, got 'long'

wolever opened this issue · 1 comments

After building a Python 2 version with 3to2 and Python 3.2, I get this error when I try to initialize a new blog:

$ blogofile init simple_blog_html5
Initializing the simple_blog_html5 site template...
Traceback (most recent call last):
  File "/usr/local/bin/blogofile", line 8, in <module>
    load_entry_point('Blogofile==0.8-DEV', 'console_scripts', 'blogofile')()
  File "/Library/Python/2.6/site-packages/blogofile/main.py", line 186, in main
    args.func(args)
  File "/Library/Python/2.6/site-packages/blogofile/main.py", line 255, in do_init
    site_init.do_init(args)
  File "/Library/Python/2.6/site-packages/blogofile/site_init/__init__.py", line 139, in do_init
    import_site_init(template)
  File "/Library/Python/2.6/site-packages/blogofile/site_init/__init__.py", line 113, in import_site_init
    f.write(zip_file.read(name))
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 836, in read
    return self.open(name, "r", pwd).read()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/zipfile.py", line 599, in read
    bytes = self.fileobj.read(bytesToRead)
TypeError: integer argument expected, got 'long'

3to2 is gone now (and good riddance! - it never worked for me)

The equivalent command with HEAD is blogofile init site-dir blog and that work's fine. There's even an integration test now in blogofile_blog to prove it. :-)