amor71 / LiuAlgoTrader

Framework for algorithmic trading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

market_miner attempt to import from 'examples' which is not part of liualgotrader's python package

TheSnoozer opened this issue · comments

Describe the bug
I finally had some time again to come back to this project :-)
Unfortunately it seems that the current market_miner script attempts to import from 'examples' which is not part of liualgotrader's python package. Even running from the root of the clone this fails. The only workaround seems to copy the examples folder into the examples folder into the site-packages folder of the current .venv (e.g. cp -R examples /.venv/lib/python3.8/site-packages/)

To Reproduce
Steps to reproduce the behavior:

  1. create a fresh venv & install liualgotrader's
rm -rf .venv
python3.8 -m virtualenv -p python3.8 .venv
python setup.py install

2 call market_miner

$ market_miner 
Traceback (most recent call last):
  File "/.venv/bin/market_miner", line 4, in <module>
    __import__('pkg_resources').run_script('liualgotrader==0.0.86', 'market_miner')
  File "/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/.venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1471, in run_script
    exec(script_code, namespace, namespace)
  File "/.venv/lib/python3.8/site-packages/liualgotrader-0.0.86-py3.8.egg/EGG-INFO/scripts/market_miner", line 16, in <module>
ModuleNotFoundError: No module named 'examples'

Expected behavior
No Exception :-)

Welcome back and thank you for bringing this to my attention. I've released v.0.0.87 which I believe resolves this issue. Kindly let me know if it's working for you too now. thanks much.

Indeed with 38f139f this can be considered fixed! Thanks again for the quick turnaround!