[Python] An OsError appears when using canvas_dump method in scapy module

Discussão em 'Python' iniciado por Stack, Março 19, 2025.

  1. Stack

    Stack Membro Participativo

    my platform is windows10, and I intall scapy which version is 2.6.1, I also intall pyx and miktex.

    when I execute below codes, an error occurs!

    from scapy.all import *
    pkt = IP() / UDP() / DNS(qd=DNSQR())
    pkt.canvas_dump()


    File f:\conda\envs\scapy\Lib\site-packages\pyx\config.py:397, in open(filename, formats, ascii) 395 else: 396 logger_filelocator.info("PyX filelocator failed to find {} of formats {}".format(filename, names)) --> 397 raise IOError("Could not locate the file '%s'." % filename) 398 if ascii: 399 return io.TextIOWrapper(file, encoding="ascii", errors="surrogateescape")

    OSError: Could not locate the file 'psfonts.map'.

    'psfonts.map' should be available at 'C:/Users/pktko/AppData/Local/MiKTeX/fonts/map/dvips/psfonts.map' according to kpsewhich, but the file is not available at this location; update your kpsewhich database

    However ,I check the path mentioned on the error report, and the file exist!

    Continue reading...

Compartilhe esta Página