blockchain - TypeError [ERR_INVALID_REPL_INPUT] [ERR_INVALID_REPL_INPUT]: `uncaughtException` 的监听器不能在 REPL 中使用
问题描述
我正在尝试测试我的第一个区块链应用程序。这是我的代码
var Contest = artifacts.require("./Contest.sol");
contract("Contest",function(accounts){
//to check if getting initialized correctly
it("initializes with two contestants", function(){
return Contest.deployed().then(function(instance){
return instance.contestantsCount();
}).then(function(count){
assert.equal(count,2);
});
});
});
但我收到此错误:
TypeError [ERR_INVALID_REPL_INPUT] [ERR_INVALID_REPL_INPUT]: Listeners
for `uncaughtException` cannot be used in the REPL
环境
Operating System: Microsoft Windows
Truffle v5.0.2 (core: 5.0.2)
Solidity v0.5.0 (solc-js)
Node v14.17.1
解决方案
不应该有逗号。它应该是:
X = faces[::-1]
y = faces[:-1:]
推荐阅读
- python - SeriesGroupBy 与 DataFrameGroupBy
- javascript - 使用此关键字的 JavaScript 对象
- vue.js - 使用 Vue 更新 d3 图表以更改数据
- r - 如何在闪亮的服务器功能中复制反应值
- amazon-web-services - 如何组合来自 EC2 资源和客户端 API 的方法?
- ajax - ASP.NET Core Razor ajax POST 请求数据对象为空
- allennlp - AllenNLP - 将测试集指标写入 Tensorboard 的配置
- c# - Azure Function 在 bin 文件夹中创建文件夹?
- python - 我有一个随机的云生成器代码,其中添加了一条我无法摆脱的额外行?
- ssis - 如何将事务应用于文件移动任务?