python - newrelic 和 zope 出错

标签 python plone newrelic zope

我正在尝试使用 zope 配置 newrelic,但它返回错误:

# bin/newrelic-admin run-python bin/zeoserver fg

Traceback (most recent call last):
  File "bin/zeoserver", line 22, in <module>
import plone.recipe.zeoserver.ctl
  File "/opt/bitnami/apps/plone/buildout-cache/eggs/plone.recipe.zeoserver-1.2.6-py2.7.egg/plone/recipe/zeoserver/__init__.py", line 9, in <module>
    import zc.recipe.egg
  File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/__init__.py", line 1, in <module>
    from zc.recipe.egg.egg import Egg, Scripts, Eggs
  File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.recipe.egg-1.3.2-py2.7.egg/zc/recipe/egg/egg.py", line 21, in <module>
    import zc.buildout.easy_install
  File "/opt/bitnami/apps/plone/buildout-cache/eggs/zc.buildout-2.2.5-py2.7.egg/zc/buildout/easy_install.py", line 81, in <module>
    pkg_resources.Requirement.parse('zc.buildout')).location,
AttributeError: 'NoneType' object has no attribute 'location'

请问有人知道是什么吗?

最佳答案

我解决了在应用程序的 __init__.py 中添加以下代码的问题:

import newrelic.agent
newrelic.agent.initialize('path/of/newrelic.ini')

并在没有命令“newrelic-admin run-python”的情况下执行应用程序。

Newrelic 工作但有局限性,因为还没有官方支持。

关于python - newrelic 和 zope 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33534108/

相关文章:

forms - 我可以在 Plone 4.3 中使用 plone.protect 3.0 吗?

php - Newrelic 无法识别我的 Slim PHP 路由

azure - NewRelic 和 Azure Insights 之间的比较

python - New Relic Python 代理可以跟踪不使用 httplib 的外部服务请求吗?

python - "fc1 = tf.reshape(conv2, [-1, weights[' wd 1'].get_shape().as_list()[0]])"在做什么?

python - 在图像中的一组点周围找到不同的边界

python - 如何将 Python 对象转换为 C 变量?

Plone + Ploneboard 最大上传文件大小

python - 为什么输出显示内存代码?

plone - 如何使用通用设置从列表类型资源注册表记录中删除元素