gpt4 book ai didi

python - Cookiecutter-bonobo 初始化失败

转载 作者:行者123 更新时间:2023-12-01 09:20:41 25 4
gpt4 key购买 nike

我是 Stack Overflow 的新手,所以如果问题的结构需要改进,我深表歉意。

我第一次尝试在 Mac 上的 cookiecutter-bonobo 中创建一个新项目(最近安装了 anaconda3 来替换 anaconda2,所以我使用 python3)。我正在遵循这些说明 https://www.bonobo-project.org/with/cookiecutter 。到目前为止,我已经使用 pip 成功安装了 cookiecutter 和 bonobo:

pip install bonobo cookiecutter

但是在命令行中执行以下步骤时出现错误:

bonobo init example-jobs

错误读取

CRIT:0001:root: Uncaught exception (in thread 140735648375616).
│ Traceback (most recent call last):
│ File "/Users/maxpaton/anaconda3/bin/bonobo", line 11, in <module>
│ sys.exit(entrypoint())
│ File "/Users/maxpaton/anaconda3/lib/python3.6/site-packages/bonobo/commands/__init__.py", line 59, in entrypoint
│ command(**parsed_args)
│ File "/Users/maxpaton/anaconda3/lib/python3.6/site-packages/bonobo/commands/init.py", line 74, in handle
│ self.create_file_from_template(template=template, filename=filename)
│ File "/Users/maxpaton/anaconda3/lib/python3.6/site-packages/bonobo/commands/init.py", line 24, in create_file_from_template
│ raise ValueError('Filenames should end with ".py".')
└ ValueError Filenames should end with ".py".

所需的结果是创建一个目录,其中包含某些有用的文件。我在 https://github.com/python-bonobo/bonobo/issues/235 发现了一个非常相似的问题,但建议的解决方案对我不起作用。

谢谢。

最佳答案

Cookiecutter 模板已被弃用,不再需要。

现在有两种方法可以引导 ETL 作业:

  • 如果您只需要一个文件,则可以运行 bonobo init my-etl-job.py(请注意扩展名)。
  • 如果您想要 python 软件包,可以安装 medikit (pip install medikit),然后运行 ​​bonobo init --package my_etl_pkg .

我刚刚更新了这方面的文档 https://www.bonobo-project.org/how-to/bootstrap来描述实际的做法,应该比以前简单得多。

希望有帮助!

关于python - Cookiecutter-bonobo 初始化失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50813692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com