2

First off, I'm not a programmer by any means. I just try to follow instructions.

So, I'm trying to use a script to decode game files. The problem is that I'm getting an error. I've tried the script on 2 different machines wheres both give the same error. At the same time, I have friends using the exact same script w/o getting this error. Does anyone have any clue what is wrong?

Traceback (most recent call last):
  File "F:\Frostbite Decoding\Decoding Files\bf4dumper.py", line 258, in <module>
    if "tocRoot" in locals():  dumpRoot(tocRoot)
  File "F:\Frostbite Decoding\Decoding Files\bf4dumper.py", line 249, in dumpRoot
    dump(fname,targetDirectory)
  File "F:\Frostbite Decoding\Decoding Files\bf4dumper.py", line 198, in dump
    LZ77.decompressUnknownOriginalSize(catEntry.path,catEntry.offset,catEntry.size,targetPath)
AttributeError: 'str' object has no attribute 'decompressUnknownOriginalSize'

If you need anymore information, please let me know.

2
  • 1
    What version of Python are you running? And your friends? Version 2 and 3 are only compatible to some extent. Commented Nov 20, 2014 at 19:41
  • @RikVerbeek I've tried both 2.7.6 and 2.7.8. My friends are running 2.7.6 or later. Commented Nov 20, 2014 at 19:51

1 Answer 1

1

Python is saying that it is receiving a string and that there is no method for decompressUnknownOriginalSize. This sounds like the script needs to get some other data type or argument type than string. Look for where "decompressUnknownOriginalSize" is called and see what data type is being passed to that argument.

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

4 Comments

I'm not 100% sure what to look for but if I search for "decompressUnknownOriginalSize", this is what I find. if toc.get("cas"): catEntry=cat[entry.sha1] LZ77.decompressUnknownOriginalSize(catEntry.path,catEntry.offset,catEntry.size,targetPath) else: LZ77.decompressUnknownOriginalSize(sbPath,entry.offset,entry.size,targetPath)
That is the first LZ77.decomp... line above. LZ77.decompressUnknownOriginalSize(catEntry.path,catEntry.offset,catEntry.size,targetPath)
For some reason LZ77 is being treated as a string instead of a compressor. Is there any import statements or defines for LZ77?
I'm not sure what that is. Is this one? LZ77 = ("F:\Frostbite Decoding\Decoding Files\LZ77") #LZ77 = cdll.LoadLibrary("LZ77")

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.