错误:找不到类型为“application / pdf”pythonanywhere服务器日志的“查看”mailcap规则

时间:2017-11-14 16:48:20

标签: python html django pythonanywhere

我正在尝试使用lolviz和graphviz来可视化数据结构,但没有输出。这是我在服务器日志中得到的错误:groupn.pythonanywhere.com.server.log

Warning: 2017-11-14 16:32:24 Illegal attribute sides in <TD> - ignored 2017-11-14 16:32:24   
Warning: 2017-11-14 16:32:24 Illegal attribute sides in <TD> - ignored 2017-11-14 16:32:24 in label of node node140165832004944 2017-11-14 16:32:24   
Warning: 2017-11-14 16:32:24 Illegal attribute sides in <TD> - ignored 2017-11-14 16:32:24 in label of node node140165832024136 2017-11-14 16:32:24   
Error: no "view" mailcap rules found for type "application/pdf" 2017-11-14 16:32:24 /usr/bin/xdg-open: 461: /usr/bin/xdg-open: 2017-11-14 16:32:24   
 links2: not found

这是我的views.py

中的功能
elif 'show' in request.POST:
                data = callviz(s).view(filename=None, directory=None, cleanup=True)
                return render(request, 'file/stacks.html', {'form': form, 'data': data})

1 个答案:

答案 0 :(得分:1)

view正在尝试在PythonAnywhere上以PDF格式打开生成的viz。在Web应用程序中,这不是一件特别有用的事情。生成一种格式,您可以将其嵌入网页或提供下载。