Author |
Message |
jdd
Joined: Dec 01, 2015 Posts: 13 Location: Portland Oregon USA
G2 patch files: 3
|
Posted: Tue Dec 01, 2015 12:34 pm Post subject:
Supported Python versions |
|
|
Hi,
I'm getting started with g2ools, and trying to run it in several environments, but not having much luck. On Python 2.7 I get errors about __init__ having the wrong number of arguments. On Python 2.5.4 I get an error that the global name "bytearray" does not exist. (I also tried Jython 2.5 and couldn't get g2ools to run there, not because of any problem in g2ools but because Jython has a limit on compiled class size and the Modules class is too big for it).
Does anyone have any advice?
Thanks,
JD |
|
Back to top
|
|
|
Electromagnetic Wave
Joined: Apr 28, 2013 Posts: 302 Location: Kebek
G2 patch files: 38
|
|
Back to top
|
|
|
jdd
Joined: Dec 01, 2015 Posts: 13 Location: Portland Oregon USA
G2 patch files: 3
|
Posted: Wed Dec 02, 2015 10:44 am Post subject:
|
|
|
Nope, I definitely don't have any luck using g2ools from github with Python 2.7.5:
File "g2ools/nord/g2/file.py", line 119, in parse
bitstream = BitStream(data, 7*8)
TypeError: __init__() takes exactly 2 arguments (3 given)
And here's the error with 2.4.4:
File "g2ools/nord/g2/file.py", line 84, in __init__
self.data = bytearray(64<<10)
NameError: global name 'bytearray' is not defined |
|
Back to top
|
|
|
jdd
Joined: Dec 01, 2015 Posts: 13 Location: Portland Oregon USA
G2 patch files: 3
|
Posted: Wed Dec 02, 2015 12:02 pm Post subject:
|
|
|
After some research it seems that bytearray was introduced in 2.6, and the change to object.__init__ was also introduced in 2.6. So I tried Python 2.6.0 and got this:
File "g2ools/nord/g2/file.py", line 912, in read
memview = self.parse_header(memoryview(self.data), filename)
NameError: global name 'memoryview' is not defined
Well, the Python docs say memoryview was introduced in 2.7. Curiouser and curiouser. |
|
Back to top
|
|
|
Electromagnetic Wave
Joined: Apr 28, 2013 Posts: 302 Location: Kebek
G2 patch files: 38
|
Posted: Wed Dec 02, 2015 12:07 pm Post subject:
|
|
|
What is your file.py ? Are you sure this file is ok ?
All your files are in the g2ools-1.5 folder ?
Can you try with another .py file ? |
|
Back to top
|
|
|
jdd
Joined: Dec 01, 2015 Posts: 13 Location: Portland Oregon USA
G2 patch files: 3
|
Posted: Wed Dec 02, 2015 12:47 pm Post subject:
|
|
|
I was using g2ools cloned from github, not the g2ools-1.5 distribution.
Now I have g2ools-1.5 with Python 2.7 and so far it is looking better. |
|
Back to top
|
|
|
cappy2112
Joined: Dec 24, 2004 Posts: 2465 Location: San Jose, California
Audio files: 2
G2 patch files: 1
|
Posted: Mon Mar 13, 2017 9:02 pm Post subject:
|
|
|
jdd wrote: | I was using g2ools cloned from github, not the g2ools-1.5 distribution.
Now I have g2ools-1.5 with Python 2.7 and so far it is looking better. |
Very strange. G2ools was created when Python 2.5 was released, so all version of Python 2.x since then should work.
I don't know if someone modified the version on GitHub, because g2ools use to be in mercurial. Fingers (the author) original had it hosted there.
Not sure why the Bytearray issue came up... _________________ Free Tibet. Release the Panchen Lama from prison. Let the Dalai Lama return to his home. |
|
Back to top
|
|
|
|