phaethon/kamene

AttributeError: module 'pyx' has no attribute 'canvas'

Opened this issue · 2 comments

cyyFh commented

When I Run the command:
from scapy.all import *
a=rdpcap(r"C:\Users\okli\Desktop\hit.pcap")
for b in a:
b.pdfdump(filename=r"C:\Users\okli\Desktop\a.pdf",layer_shift=1)
I encounter a error “AttributeError: module 'pyx' has no attribute 'canvas'”
The all details are listed as:

File "C:\Users\okli\Anaconda3\lib\site-packages\scapy\packet.py", line 418, in pdfdump
canvas = self.canvas_dump(**kargs)

File "C:\Users\okli\Anaconda3\lib\site-packages\scapy\packet.py", line 428, in canvas_dump
canvas = pyx.canvas.canvas()

AttributeError: module 'pyx' has no attribute 'canvas'

And my environment is WIN10(x64)anaconda3.5 kamene
Could you please tell me how to solve it.

cyyFh commented

And I also catch another error when I run the command "a[3].pdfdump(r"C:\Users\okli\Desktop\l.pdf",layer_shift=1)" in anaconda's python shell

~\Anaconda3\lib\site-packages\pyx\text.py in do_typeset(self, expr, texmessages)
1202 if self.state < STATE_TYPESET:
1203 self.go_typeset()
-> 1204 return self._execute(expr, texmessages, STATE_TYPESET, STATE_TYPESET)
1205
1206 def do_finish(self):

~\Anaconda3\lib\site-packages\pyx\text.py in _execute(self, expr, texmessages, oldstate, newstate)
1069 expr = "\ProcessPyXBox{%s%%\n}{%i}" % (expr, self.page)
1070 self.executeid += 1
-> 1071 self.texoutput.expect("PyXInputMarker:executeid=%i:" % self.executeid)
1072 expr += "%%\n\PyXInput{%i}%%\n" % self.executeid
1073 self.texinput.write(expr)

AttributeError: 'SingleTexRunner' object has no attribute 'texoutput'

From the brief look at this - could it be an issue with PyX instalation? See this discussion:
https://stackoverflow.com/questions/41377700/issue-plotting-cap-files-scapy-python3