mhallsmoore / qsforex

QuantStart Forex Backtesting and Live Trading
http://www.quantstart.com
763 stars 352 forks source link

getting the same error on multiple computer operation systems. #49

Open leolle opened 7 years ago

leolle commented 7 years ago

Hi, Michael, I am getting this error under the virtual environment when executing this command: python trading/trading.py can you help? thank you.

Traceback (most recent call last): File "trading/trading.py", line 49, in <module> logging.config.fileConfig('../logging.conf') File "/usr/lib/python2.7/logging/config.py", line 77, in fileConfig formatters = _create_formatters(cp) File "/usr/lib/python2.7/logging/config.py", line 113, in _create_formatters flist = cp.get("formatters", "keys") File "/usr/lib/python2.7/ConfigParser.py", line 607, in get raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'formatters'

dieterjansen commented 7 years ago

Hi leolle,

The fix is relatively simple.

In trading.py change line 49 from using a path relative to your current directory (“../logging.conf”) to use an absolute path instead (for example something like “/home/leolle/projects/qsforex/logging.conf” depending on where you installed).

The way you tried to start trading.py is the way its described in the documentation but the program itself assumed you will be in the trading directory when you start it, contrary to the docs.

A more systematic fix is the subject of Pull Request https://github.com/mhallsmoore/qsforex/pull/39 but this is still pending.

Hope that helps – several of us in a small group in Adelaide Australia have been able to get the auto trading running against a practice account.

Cheers, Dieter.

From: leolle Sent: Friday, July 15, 2016 11:51 PM To: mhallsmoore/qsforex Subject: [mhallsmoore/qsforex] getting the same error on multiple computer operation systems. (#49)

Hi, Michael, I am getting this error under the virtual environment when executing this command: python trading/trading.py can you help? thank you.

Traceback (most recent call last): File "trading/trading.py", line 49, in logging.config.fileConfig('../logging.conf') File "/usr/lib/python2.7/logging/config.py", line 77, in fileConfig formatters = _create_formatters(cp) File "/usr/lib/python2.7/logging/config.py", line 113, in _create_formatters flist = cp.get("formatters", "keys") File "/usr/lib/python2.7/ConfigParser.py", line 607, in get raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'formatters'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

leolle commented 7 years ago

Hi Jansen, thank you very much for your advice, it works perfectly. I changed the logging.conf file path to an absolute directory, it's find now.

dieterjansen commented 7 years ago

You’re welcome leolle, glad I could assist.

We’re all looking forward to starting work with QSTrader down here – Michael and several others have been putting in heaps of work on that recently.

Cheers, Dieter.

From: leolle Sent: Saturday, July 16, 2016 10:40 AM To: mhallsmoore/qsforex Cc: dieterjansen ; Comment Subject: Re: [mhallsmoore/qsforex] getting the same error on multiple computer operation systems. (#49)

Hi Jansen, thank you very much for your advice, it works perfectly. I changed the logging.conf file path to an absolute directory, it's find now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

leolle commented 7 years ago

Hi Dieter, Can I ask a question about the heartbeat? Does the thread stop as the heartbeat interval if there is no new ticks coming in? Does the thread resume back to work if there's new ticks coming in? How can I make my trading system working on a 5 or 15 minutes time frame interval instead of tick by tick?

Thank you.

Regards, Wei

On Sat, Jul 16, 2016 at 10:09 AM, dieterjansen notifications@github.com wrote:

You’re welcome leolle, glad I could assist.

We’re all looking forward to starting work with QSTrader down here – Michael and several others have been putting in heaps of work on that recently.

Cheers, Dieter.

From: leolle Sent: Saturday, July 16, 2016 10:40 AM To: mhallsmoore/qsforex Cc: dieterjansen ; Comment Subject: Re: [mhallsmoore/qsforex] getting the same error on multiple computer operation systems. (#49)

Hi Jansen, thank you very much for your advice, it works perfectly. I changed the logging.conf file path to an absolute directory, it's find now.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mhallsmoore/qsforex/issues/49#issuecomment-233102873, or mute the thread https://github.com/notifications/unsubscribe-auth/AMSS0guVOfqu0kOFedq0qO8ldvZ9cWl2ks5qWD1ogaJpZM4JNcZW .