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: module 'pyx' has no attribute 'canvas' #248

Open
cyyFh opened this issue Jun 5, 2018 · 2 comments
Open

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

cyyFh opened this issue Jun 5, 2018 · 2 comments

Comments

@cyyFh
Copy link

cyyFh commented Jun 5, 2018

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
Copy link
Author

cyyFh commented Jun 5, 2018

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'

@phaethon
Copy link
Owner

phaethon commented Jun 5, 2018

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

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