Giter VIP home page Giter VIP logo

Comments (5)

zrax avatar zrax commented on August 25, 2024

That message indicates that the magic number (first 4 bytes of the pyc file) wasn't recognized... Since the .pyc files included in the tests directory are known to work at least far enough to decode the magic number, I suspect something is odd about compilation with VS2012, but I haven't been able to reproduce it so far (I tried with the VS 2012 platform toolset in both x86 and x64 targets). Please verify that your .pyc files aren't corrupt, and provide more details on your configuration.

from pycdc.

raszpl avatar raszpl commented on August 25, 2024

Confirming

Compiled with VC++2008 Express

K:\Documents and Settings\Administrator\Desktop\wot\dec\pycdc\bin>pycdas.exe ..\tests\15_test_class.pyc
Bad MAGIC!
15_test_class.pyc (Python -1.-1)
<TYPE: 48>

K:\Documents and Settings\Administrator\Desktop\wot\dec\pycdc\bin>pycdas.exe ..\tests\15_test_expressions.pyc
Bad MAGIC!
15_test_expressions.pyc (Python -1.-1)
<TYPE: 48>

K:\Documents and Settings\Administrator\Desktop\wot\dec\pycdc\bin>pycdas.exe ..\tests\22_class_method.pyc
Bad MAGIC!
22_class_method.pyc (Python -1.-1)
<TYPE: 48>

K:\Documents and Settings\Administrator\Desktop\wot\dec\pycdc\bin>pycdas.exe ..\tests\26_if_elif_else.pyc
Bad MAGIC!
26_if_elif_else.pyc (Python -1.-1)
<TYPE: 48>

K:\Documents and Settings\Administrator\Desktop\wot\dec\pycdc\bin>pycdas.exe ..\tests\31_while_loops.pyc
Bad MAGIC!
31_while_loops.pyc (Python -1.-1)
<TYPE: 48>

from pycdc.

idigger avatar idigger commented on August 25, 2024

Compiled with vc++2008 Debug mode is ok,
Release mode getting Bad MAGIC!

from pycdc.

raszpl avatar raszpl commented on August 25, 2024

vc++2008 with Debug mode produced garbage .exe files for me (“Program is not a recognized executable”) :(

from pycdc.

zrax avatar zrax commented on August 25, 2024

It turns out that newer versions of VS will re-order the getByte() calls in Release mode, but not Debug mode. This is why I couldn't reproduce it before :(. I'm creating a fix now

from pycdc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.