Mapgax / ibpy

Automatically exported from code.google.com/p/ibpy
Other
0 stars 0 forks source link

errors with fresh build form source #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
hi all-- I'm sort of a newbie, but i'm a fast learner. Looking for a little 
help and direction. I followed the directions for building and getting things 
setup from troy (thanks btw!). I was trying to follow through some of the 
examples but none of the demos or any imports seem to work. They all crash with 
the same errors:

>>> from ib.opt import ibConnection, message
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/ib/opt/__init__.py", line 30, in <module>
    from ib.opt.connection import Connection
  File "/Library/Python/2.7/site-packages/ib/opt/connection.py", line 22, in <module>
    from ib.opt.sender import Sender
  File "/Library/Python/2.7/site-packages/ib/opt/sender.py", line 11, in <module>
    from ib.ext.EClientSocket import EClientSocket
  File "/Library/Python/2.7/site-packages/ib/ext/EClientSocket.py", line 21, in <module>
    from ib.ext.EReader import EReader
  File "/Library/Python/2.7/site-packages/ib/ext/EReader.py", line 29
    from __builtin__ import float, str, None, True, False
SyntaxError: cannot assign to None
>>> 

I'm working on a Mac OS 10.8

Any and all help very appreciated!

Original issue reported on code.google.com by mjannapu...@gmail.com on 6 Aug 2012 at 9:53

GoogleCodeExporter commented 8 years ago
It seems that the error is being raised by tyring to import 'None' from 
__builtin__
I can't find any code anywhere that says to import None. I did find in the 
Python documentation that it says that as of version 2.4 assigning something to 
None would cause it to raise a syntax error. If i try "from __builtin__ import 
None" it raises the same error. Is this my problem? do i need to use an older 
python interpreter?

Original comment by mjannapu...@gmail.com on 6 Aug 2012 at 10:13

GoogleCodeExporter commented 8 years ago
i just found this thread that seems to refer to this same problem, but like i 
said, i don't see any code in EReader.py or anywhere else I've looked that 
includes "from __builtin__ import float, str, None, True, False" so I can't 
comment it out

Original comment by mjannapu...@gmail.com on 6 Aug 2012 at 10:29

GoogleCodeExporter commented 8 years ago
Got it figure out guys... That's it for this problem, i'm sure I will create 
others :)

Original comment by mjannapu...@gmail.com on 6 Aug 2012 at 11:14

GoogleCodeExporter commented 8 years ago
I have the exact same problem, so would you care to share your solution?

Thanks a bunch

Original comment by bvanmarw...@gmail.com on 27 Jul 2013 at 12:33

GoogleCodeExporter commented 8 years ago
I believe removing None from the 
from __builtin__ import float, str, None, True, False
might do the trick

Original comment by maggi...@gmail.com on 6 Sep 2013 at 11:00

GoogleCodeExporter commented 8 years ago
Hello, I'm getting the same problem, would you kindly share your solution?  
Regards,mg

Original comment by gru...@gmail.com on 24 Oct 2013 at 8:56

GoogleCodeExporter commented 8 years ago
I had the same problem. The solution was to just remove None as suggested by 
maggi:

from __builtin__ import float, str, True, False

Original comment by leopoldo...@gmail.com on 4 Jan 2014 at 6:40

GoogleCodeExporter commented 8 years ago
Same issue here. Deleted "None" from that line and it works now.

Original comment by andrescabral on 6 Jan 2014 at 11:20