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

rdf2dot script fails due to deprecated cgi module #1110

Closed
arnikz opened this issue Jun 3, 2020 · 0 comments · Fixed by #1152
Closed

rdf2dot script fails due to deprecated cgi module #1110

arnikz opened this issue Jun 3, 2020 · 0 comments · Fixed by #1152

Comments

@arnikz
Copy link

arnikz commented Jun 3, 2020

RDFLib Version: 5.0.0

Traceback (most recent call last):
  File "/home/arni/local/miniconda3/envs/rdf/bin/rdf2dot", line 8, in <module>
    sys.exit(main())
  File "/home/arni/local/miniconda3/envs/rdf/lib/python3.8/site-packages/rdflib/tools/rdf2dot.py", line 131, in main
    rdflib.extras.cmdlineutils.main(rdf2dot, _help)
  File "/home/arni/local/miniconda3/envs/rdf/lib/python3.8/site-packages/rdflib/extras/cmdlineutils.py", line 67, in main
    target(g, out, args)
  File "/home/arni/local/miniconda3/envs/rdf/lib/python3.8/site-packages/rdflib/tools/rdf2dot.py", line 103, in rdf2dot
    fields[sn].add((qname(p, g), formatliteral(o, g)))
  File "/home/arni/local/miniconda3/envs/rdf/lib/python3.8/site-packages/rdflib/tools/rdf2dot.py", line 74, in formatliteral
    v = cgi.escape(l)
AttributeError: module 'cgi' has no attribute 'escape'

Replacing cgi with html module should fix this issue.

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

Successfully merging a pull request may close this issue.

1 participant