Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'generate' #13

Open
DeBuXer opened this issue Feb 8, 2022 · 1 comment
Open

AttributeError: 'NoneType' object has no attribute 'generate' #13

DeBuXer opened this issue Feb 8, 2022 · 1 comment
Assignees

Comments

@DeBuXer
Copy link

DeBuXer commented Feb 8, 2022

I'm trying upgrading our Mediawiki installation from an old version to 1.35 LTS. GraphViz isn't maintained anymore, so I'm now using the plugin Diagrams. The Python application is running and I can draw diagrams directly from the build-in webgui. Only drawing a diagram from our Mediawiki installation doesn't work. Diagrams show the following error when I try to draw a diagram from Mediawiki:

[2022-02-08 13:28:14,315] ERROR in app: Exception on /render [POST]
Traceback (most recent call last):
 File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
   response = self.full_dispatch_request()
 File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
   rv = self.handle_user_exception(e)
 File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
   rv = self.dispatch_request()
 File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
   return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
 File "dgs/webserver.py", line 68, in renderForWikiExtension
   result=gen.generate('dot',source,targetFormat)
AttributeError: 'NoneType' object has no attribute 'generate'

The diagram I tried to draw:

<graphviz>
   digraph G {
     rankdir = TD;
     edge [arrowhead=none];
     node [shape=box, color=lightblue2, style=filled];
     "dummy1"; "dummy2"; "dummy3";

     "dummy1" -> "dummy3" [label="100Mbps" fontsize="10"];
     "dummy1" -> "dummy3" [label="100Mbps" fontsize="10"];
     "dummy2" -> "dummy3" [label="100Mbps" fontsize="10"];
     "dummy2" -> "dummy3" [label="100Mbps" fontsize="10"];
   }
</graphviz>

LocalSettings.php:

wfLoadExtension('Diagrams');
$wgDiagramsServiceUrl = 'http://127.0.0.1:5003';
@WolfgangFahl WolfgangFahl self-assigned this Feb 16, 2022
@WolfgangFahl
Copy link
Member

You might want to try pymediawikidocker to test things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants