ets和阅读文件的错误 [英] An error with ets and reading files

查看:236
本文介绍了ets和阅读文件的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

免责声明:我没有写这段代码,我只是想让它工作。

Disclaimer: I didn't write this code, I'm just trying to make it work.

我试图从 here 工作。
安装程序是安装了Erlang的Ubuntu 14.04 64位计算机。

I'm trying to get the code from here working. The setup is an Ubuntu 14.04 64bit machine with Erlang installed.

操作顺序如下:
我在做什么是如下:

The sequence of actions is as follows: What I'm doing is as follows:


  1. 克隆代码

  2. cd 到终端
  3. 中的代码 erl 的文件夹
  4. make:all([load])

  5. polis:create()。

  6. code> polis:start()。

  7. benchmarker:start(slidingwindow50)。 / li>
  1. clone the code
  2. cd to the folder with the code and erl in terminal
  3. make:all([load]).
  4. polis:create().
  5. polis:start().
  6. benchmarker:start(slidingwindow50).

我得到的错误是:

4> benchmarker:start(slidingwindow50).
true Dimensions:4,
Plasticity:none Dimensions:4, Plasticity:none Dimensions:4,
Plasticity:none Dimensions:4, Plasticity:none Dimensions:4,
Plasticity:none Dimensions:4, Plasticity:none Dimensions:4,
Plasticity:none Dimensions:4, Plasticity:none Dimensions:4,
Plasticity:none Dimensions:4, Plasticity:none

Specie_Id:6.858114617542796e-10 Morphology:forex_trader

******** Population monitor started with parameters:{state,benchmark,test,[], [],undefined,undefined,
undefined,[],0,0,0,0,0, undefined,undefined, undefined,undefined,
undefined,undefined,0.5, 10,10,mathema,inf,10000, inf,<0.274.0>,false}
Initial Tot Evaluations:0

Started Started Started Started Started Started Started

5> =ERROR REPORT==== 16-Mar-2016::14:11:34 === Error in process
<0.287.0> with exit value:
{badarg,[{ets,last,['EURUSD15'],[]},{fx,init_state,5,[{file,"fx.erl"},{line,375}]},{fx,sim,3,[{file,"fx.erl"},{line,284}]}]}

=ERROR REPORT==== 16-Mar-2016::14:11:34 === Error in process <0.288.0> with exit value:
{badarg,[{ets,last,['EURUSD15'],[]},{fx,init_state,5,[{file,"fx.erl"},{line,375}]},{fx,sim,3,[{file,"fx.erl"},{line,284}]}]}

查看 fx.erl 的代码显示,问题可能源于 ets 部分和 .txt 文件不被从磁盘读入内存中。

Reviewing the code of fx.erl shows that the problem probably stems from the ets part and a .txt file not being read from disk and into a table in memory.

更新:我一直在尝试调查 fx 的功能。到目前为止,我有这样的结果:
fx:sim(任何)输出已启动,使shell无响应;
fx:init()。结果

Update: I've been trying to investigate the function of fx. So far, I've had such results: fx:sim(anything) outputs "Started" and makes the shell unresponsive; fx:init(). results in


初始化外汇货币
表:[元数据,'EURUSD15','EURUSD30','EURUSD60']外汇元数据&
货币表初始化并写入文件。
ok

Initializing FX currency tables:[metadata,'EURUSD15','EURUSD30','EURUSD60'] FX metadata & currency tables initialized and written to file. ok

fx:loop()。输出很多


新记录插入表:'EURUSD15'

New record inserted into table:'EURUSD15'

最后一行是


新的FOREX_DB更新以:{2009,6,16,7,30,0 ,15}

New FOREX_DB update starting with:{2009,6,16,7,30,0,15}

然后


= ERROR REPORT ==== 2016年3月22日:: 16:41:26 ===退出值为$ 0.357.0的错误
{badarg,[{fx,insert_ForexRaw,2, [{文件, fx.erl},{线,767}]},{FX,更新器,如图1所示,[{文件, fx.erl},{线,698}]},{FX,心跳3,[{file,fx.erl},{line,692}]}]}

=ERROR REPORT==== 22-Mar-2016::16:41:26 === Error in process <0.357.0> with exit value: {badarg,[{fx,insert_ForexRaw,2,[{file,"fx.erl"},{line,767}]},{fx,updater,1,[{file,"fx.erl"},{line,698}]},{fx,heartbeat,3,[{file,"fx.erl"},{line,692}]}]}

运行 ets:i()。 after fx:init()。不显示名为 EURUSD15

Running ets:i(). after fx:init(). shows no table called EURUSD15.

为什么会这样,我该如何解决?

Why may that be, and how can I fix that?


如果找到一个工作的解决方案,我打算要求更改与原始代码合并(基本上我会尝试推送请求)。

P.S. If a working solution is found, I intend to ask for the changes to be merged with the original code (basically, I'll try a push request).

推荐答案

我熟悉这个平台,我们在机器上运行,去年我们把它作为培训材料。

I am familiar with that platform, and we are running it on our machines, we used it as our training material last year.

这是因为您在启动基准测试者之前没有启动外汇模拟器。

This is occurring because you didn't start the forex simulator before starting the benchmarker.

这篇关于ets和阅读文件的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆