0

I'm attempting to use the python 010 editor template parser

The doc specifically states (to get started):

import pfp
pfp.parse(data_file="C:\path2File\file.SWF",template_file="C:\path2File\SWFTemplate.bt")

However, it throws:

RuntimeError: Unable to invoke 'cpp'. Make sure its path was passed correctly
Original error: [Error 2] The system cannot find the file specified

I've tried everything, from using raw strings:

df = r"C:\path2File\file.swf"
tf = r"C:\path2File\SWFTemplate.bt"

To single and then double '\'s or '/'s in the string. However, it keeps throwing the above error message.

I checked the files are in the path and ensured everything is properly spelled, case sensitively.

To test my paths, I've used the windows "type" (equiv to *nix strings) and passed the strings as args in a subprocess.Popen which worked.

1 Answer 1

1

The problem is that it's trying to invoke a C++ compiler: cpp and you don't have one.

You'll need to install one, or make sure that your PATH has a cpp.exe on it somewhere.

Sign up to request clarification or add additional context in comments.

3 Comments

there aren't any compilers called cpp on windows (cl is the c++ compiler in MSVC). On *nix and ubuntu, there's only g++, searching on my ubuntu server didnt show any elf binary called 'cpp' and dpkg shows no candidates. google yielded no results regarding a 'cpp' binary either :(
Use the source, @grepNstepN! Open the pfp file(s) - you can find out where by adding print pfp.__file__ to your source - and you should be able to find cpp in one of those files. I believe that cpp is the binary that VS produces... it's been quite a while since CS1, but I do remember using a cpp executable because I couldn't figure out what it was called on linux until I asked my brother ;)
thanks mate. I imported pfp and ran print pfp.__file__ and it pointed to pfp's init.py which had cpp_path="cpp" and args as cpp_args="-xc++" several inports of its own. after checking on my coworker's linux box, he has it as a binary so I installed mingw on windows and have its path in my %PATH% environmental variable and its working (but throwing error messages, it wasnt specified on the site but it turns out pfp is meant for nix not windows)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.