小编use*_*er1的帖子

我怎样才能在PATH中添加风暴?

这里我应该做的步骤

1-下载Storm版本,解压缩,然后将解压缩的bin /目录放在PATH上

2- To be able to start and stop topologies on a remote cluster
Run Code Online (Sandbox Code Playgroud)

,将集群信息放在〜/ .storm/storm.yaml中

我下载了风暴版本并设置它我想这样做"将解压缩的bin /目录放在你的PATH上"

因为我不能用风暴作为命令

第二步我应该在storm.yaml中做什么集群信息?

linux apache-storm

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

unicode,而不是 python 中的 str

我试图运行这个 Python 代码:

with io.open(outfile, 'w' ) as processed_text, io.open(infile, 'r') as fin:
    for line in fin:
        processed_text.write(preprocess(line.rstrip())+'\n')
Run Code Online (Sandbox Code Playgroud)

但得到 TypeError: must be unicode, not str

我怎么解决这个问题?我在这里搜索了类似的问题,并找到了一个可以尝试的问题

with io.open(outfile, 'w', encoding="utf-8") as processed_text, io.open(infile, 'r') as fin:
Run Code Online (Sandbox Code Playgroud)

但没有用。

python python-2.7

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

标签 统计

apache-storm ×1

linux ×1

python ×1

python-2.7 ×1