Comments (6)
Can you upload the file you're trying to open?
from unitypack.
I'm not familiar to python syntax (such as * notation), so I'm just pasting my quick fix of this problem.
I refered this url:
http://stackoverflow.com/questions/5773607/python-what-is-the-most-efficient-way-to-generate-padding
In utils.py,
def read(self, *args):
return self.buf.read(*args)
to this:
def read(self, args):
readResult = self.buf.read(args)
if (len(readResult) < args):
readResult = readResult .ljust(args, b'\0')
return readResult
I omitted * of args
for just make it run with least effort ;). Sorry for that.
Sorry for not uploading problematic asset file, for it's confidential one.
Thank you.
from unitypack.
That will prevent the crash but it won't actually help reading. All it's doing is feeding in garbage instead of feeding in nothing.
from unitypack.
This was probably fixed by 11c22bc.
from unitypack.
Sadly, error still occur:
unityextract.py --all -o D:\TUM\UnityPack globalgamemanagers.assets
output:
Traceback (most recent call last):
File "%USERPROFILE%\AppData\Local\Programs\Python\Python36-32\Scripts\unityextract.py", line 153, in <module>
main()
File "%USERPROFILE%\AppData\Local\Programs\Python\Python36-32\Scripts\unityextract.py", line 149, in main
exit(app.run())
File "%USERPROFILE%\AppData\Local\Programs\Python\Python36-32\Scripts\unityextract.py", line 49, in run
self.handle_asset(asset)
File "%USERPROFILE%\AppData\Local\Programs\Python\Python36-32\Scripts\unityextract.py", line 91, in handle_asset
d = obj.read()
File "%USERPROFILE%\appdata\local\programs\python\python36-32\lib\site-packages\unitypack\object.py", line 74, in read
return self.read_value(self.type_tree, buf)
File "%USERPROFILE%\appdata\local\programs\python\python36-32\lib\site-packages\unitypack\object.py", line 132, in read_value
result[child.name] = self.read_value(child, buf)
File "%USERPROFILE%\appdata\local\programs\python\python36-32\lib\site-packages\unitypack\object.py", line 100, in read_value
size = buf.read_uint()
File "%USERPROFILE%\appdata\local\programs\python\python36-32\lib\site-packages\unitypack\utils.py", line 105, in read_uint
return struct.unpack(self.endian + "I", self.read(4))[0]
struct.error: unpack requires a bytes object of length 4
Unity version: 5.4.0f3
Assets file in attachment: globalgamemanagers.zip
from unitypack.
Your version of unitypack appears to be out of date; for example, this is the current object.py at line 132, whereas the traceback states result[child.name] = self.read_value(child, buf)
from unitypack.
Related Issues (20)
- keyerror -10
- Release on PyPi is 2 years out of date.
- Decompression failed: HOT 7
- ValueError: 1056964608 is not a valid RuntimePlatform
- _block.LZ4BlockError: Decompression failed (Error code: 30236) HOT 3
- We don't have any unit tests
- warning: statement has no effect [-Wunused-value]
- Can I repack after edit .unity3d Object
- Unpacking error some assets files
- Can't extract ogg files with unityextract HOT 1
- Can't extract ogg files with unityextract HOT 3
- Support Repacking? HOT 3
- SyntaxError: invalid syntax HOT 2
- ValueError: 64 is not a valid RuntimePlatform
- struct.error: unpack requires a buffer of 3714449519 bytes HOT 6
- Cannot examine packages from Unity 2019.2
- Trying to extract image file HOT 4
- Wheel compile error HOT 1
- struct.error: unpack requires a buffer of 4 bytes HOT 1
- Unimplemented format <TextureFormat.ETC2_RGBA8: 47> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unitypack.