小编cod*_*ody的帖子

eb deploy ERROR:TypeError - 无法连接'str'和'NoneType'对象

对不起,我没有在任何地方看到这个问题 我在AWS上为我的应用程序"scones"部署了一个环境.这是相当简单的Node.js表达应用程序.老实说,这只是测试弹性beanstalk部署.Anyhoo我正在使用ebcli,我已经完成了"eb create scones1",它确实创建了环境并启动了它.但是当我做一些更改(没有提交到git)并在命令行上输入'eb deploy'时,我ERROR: TypeError - cannot concatenate 'str' and 'NoneType' objects每次都会收到.即使我输入了环境名称.无所谓.怎么了?没有任何文档似乎提到这样的任何错误.我的Python版本有问题吗?一世

amazon-web-services amazon-elastic-beanstalk

8
推荐指数
3
解决办法
1453
查看次数

如何打印来自 Sagemaker 培训的调试信息?

我有一个 jupyter notebook 脚本,它只是启动一个训练脚本,大概是在一个 docker 容器中。

我在该训练脚本中添加了一些打印语句,但它没有显示在笔记本或 CloudWatch 中。

我正在使用常规的 print() 语句。我应该如何从训练脚本记录调试?

jupyter-notebook amazon-sagemaker

8
推荐指数
2
解决办法
3260
查看次数

bash:全局否定和多种模式的问题

我正在尝试编写一个 glob 模式,该模式返回不以 2 个可能的后缀之一结尾的文件列表:完成和每月

我的测试目录中的文件列表是:

foo.done
foo.montly
foo.pdf
foo.txt
Run Code Online (Sandbox Code Playgroud)

如果我只对 1 个后缀执行否定,我就非常成功:

ls  !(*done) or ls  !(*monthly)
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试这样的事情时:

ls  !({*monthly,*done})
Run Code Online (Sandbox Code Playgroud)

我明白了:

foo.done
foo.monthly
foo.pdf
foo.pdf
foo.txt
foo.txt
Run Code Online (Sandbox Code Playgroud)

有人可以帮助我理解一个结果,它不仅不会产生我想要的否定结果,而且还会列出重复项!

bash glob

5
推荐指数
1
解决办法
291
查看次数

AttributeError: 模块“sklearn.mixture”没有属性“GMM”

我正在尝试运行以下 Python 项目:

https://github.com/huanghe314/Text-Independent-Speaker-Indentification-System

这取决于sklearn.mixture.GMM,但尽管我已sklearn安装,但未能找到该模块。它给出的错误如下:

Traceback (most recent call last):

File "C:/Users/User/PyCharmApp/Text-Independent-Speaker-Indentification-System-master/Code/main.py", line 85, in <module>
    p_weight[m] = training.Training_feature_Weight(Name[m] + '.wav')


File "C:\Users\User\PyCharmApp\Text-Independent-Speaker-Indentification-System-master\Code\training.py", line 24, in Training_feature_Weight
    Weight_training = Training_info.GMM_Model_Weight()
  File "C:\Users\User\PyCharmApp\Text-Independent-Speaker-Indentification-System-master\Code\GMM.py", line 31, in GMM_Model_Weight
    weight = mixture.GMM(n_components = self.M, min_covar = 0.01, n_init = 10).fit(self.features).weights_
Run Code Online (Sandbox Code Playgroud)

我正在运行 Python 3.6。

python python-3.x scikit-learn

4
推荐指数
1
解决办法
4474
查看次数

webpack&aws lambda

我正在尝试使用Weback构建一个简单的lambda nodejs函数hello world.

exports.handler = (event, context, callback) => {
    callback(null, 'Hello from Lambda');
};
Run Code Online (Sandbox Code Playgroud)

此函数在lambda中工作,并在aws lambda配置页面中配置处理程序"index.handler".

Webpack为上面生成的代码不起作用.该函数抛出模块'index'上的错误"Handler'handler'".它看起来像模块成为反义词.

可以通过更新生成的代码使其工作,如下所示.

global.handler = (event, context, callback) => {
    //async.map(['file1','file2','file3'], console.log, function(err, results){
        // results is now an array of stats for each file
        callback(null, 'Hello from Lambda');
    //});

//add the following at the end.
exports.handler = global.handler;
Run Code Online (Sandbox Code Playgroud)

webpack.config.js如下.

var path = require('path');
module.exports = {
    // Specify the entry point for our app.
    entry: [
        path.join(__dirname, '/src/autotag.js')
    ],
    // Specify the output …
Run Code Online (Sandbox Code Playgroud)

node.js webpack aws-lambda

3
推荐指数
1
解决办法
842
查看次数

推送到Bitbucket存储库时出现“致命:身份验证失败”错误

我正在Windows 7终端中进行身份验证:git push。以前曾经工作过,但现在我得到了:

致命:https://bitbucket.srv ...的身份验证失败。

但是,我可以通过浏览器登录相同的仓库。这是git问题吗?怎么解决?

git bitbucket windows-7

1
推荐指数
1
解决办法
2882
查看次数