Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

[BUG] No module named 'Queue' in ibpy2 dependency #179

Open
dizzydes opened this issue Jan 28, 2022 · 2 comments
Open

[BUG] No module named 'Queue' in ibpy2 dependency #179

dizzydes opened this issue Jan 28, 2022 · 2 comments
Labels

Comments

@dizzydes
Copy link

Describe the bug
I'm getting a Queue vs queue capitalization error (more details here - it relates to a change in Python 2 vs 3) when trying to run the blotter file. It seems to stem from ibpy2 - is this where it should be gathering these libs from? Is there an alternative for this dependency or a workaround?

I've tried changing the capitalization in the file specified in the stack trace but it fires an exception for trying to print too many exceptions then! So I assume its bad...

Desktop (please complete the following information):

  • OS: Windows 10 (running from Powershell as Admin)

Additional context
Stack trace:

PS C:\Users\desmo\Documents\sdata> python blotter.py
Traceback (most recent call last):
  File "C:\Users\desmo\Documents\sdata\blotter.py", line 2, in <module>
    from qtpylib.blotter import Blotter
  File "C:\Users\desmo\AppData\Local\Programs\Python\Python310\lib\site-packages\qtpylib-1.5.84-py3.10.egg\qtpylib\blotter.py", line 51, in <module>
    from ezibpy import (
  File "C:\Users\desmo\AppData\Local\Programs\Python\Python310\lib\site-packages\ezibpy-1.12.70-py3.10.egg\ezibpy\__init__.py", line 26, in <module>
  File "C:\Users\desmo\AppData\Local\Programs\Python\Python310\lib\site-packages\ezibpy-1.12.70-py3.10.egg\ezibpy\ezibpy.py", line 31, in <module>
  File "C:\Users\desmo\AppData\Local\Programs\Python\Python310\lib\site-packages\ibpy2-0.8.0-py3.10.egg\ib\opt\__init__.py", line 30, in <module>
    from ib.opt.connection import Connection
  File "C:\Users\desmo\AppData\Local\Programs\Python\Python310\lib\site-packages\ibpy2-0.8.0-py3.10.egg\ib\opt\connection.py", line 20, in <module>
    from ib.opt.dispatcher import Dispatcher
  File "C:\Users\desmo\AppData\Local\Programs\Python\Python310\lib\site-packages\ibpy2-0.8.0-py3.10.egg\ib\opt\dispatcher.py", line 8, in <module>
    from Queue import Queue, Empty
ModuleNotFoundError: No module named 'Queue'
@dizzydes dizzydes added the bug label Jan 28, 2022
@772435284
Copy link

I install qtpylib following this comment #141 (comment), because the pip install seems not working now. However, using python setup.py install will mess up something if you do not specify the install path, especially when you have anaconda and python at the same time. I am not an expert in package installation and I hope someone can point out the main issue here.

I spent a few hours and solved the problems using brute force. Here is the solution:

  1. Find your package install location, e.g. C:\ProgramData\Anaconda3\Lib\site-packages
  2. Delete folder ib and folder IbPy2-0.8.0.dist-info
  3. Move ibpy2-0.8.0-py3.8.egg (Needs to be downloaded) to this directory
  4. Rerun python setup.py install

@ghost
Copy link

ghost commented Jun 18, 2023

I install qtpylib following this comment #141 (comment), because the pip install seems not working now. However, using python setup.py install will mess up something if you do not specify the install path, especially when you have anaconda and python at the same time. I am not an expert in package installation and I hope someone can point out the main issue here.

I spent a few hours and solved the problems using brute force. Here is the solution:

  1. Find your package install location, e.g. C:\ProgramData\Anaconda3\Lib\site-packages
  2. Delete folder ib and folder IbPy2-0.8.0.dist-info
  3. Move ibpy2-0.8.0-py3.8.egg (Needs to be downloaded) to this directory
  4. Rerun python setup.py install

Where do I find ibpy2-0.8.0-py3.8.egg?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants