Skip to content

Type errors #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
madpipeline opened this issue Feb 7, 2020 · 3 comments
Open

Type errors #2

madpipeline opened this issue Feb 7, 2020 · 3 comments

Comments

@madpipeline
Copy link

I'm getting these errors for all the data blocks:

Block data: 1c 09 ff ff 02 02 78 9c ed c1 31 01 00 00 00 c2 a0 f5 4f 6d 0c 1f a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 b7 01 40 00 00 01 78 9c 63 00 00 00 01 00 01 00 00 00 ff ff ff ff 00 00 01 00 00 00 06 69 67 6e 6f 72 65 0a 00 00 
Data after node metadata: 
Traceback (most recent call last):
  File "./minetestmapper.py", line 722, in <module>
    static_object_version = readU8(f)
  File "./minetestmapper.py", line 127, in readU8
    return ord(f.read(1))
TypeError: ord() expected a character, but string of length 0 found
Error at (38,-7,-22): ord() expected a character, but string of length 0 found
Block data: 1c 09 ff ff 02 02 78 9c ed c1 31 01 00 00 00 c2 a0 f5 4f 6d 0c 1f a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 b7 01 40 00 00 01 78 9c 63 00 00 00 01 00 01 00 00 00 ff ff ff ff 00 00 01 00 00 00 06 69 67 6e 6f 72 65 0a 00 00 
Data after node metadata: 
Traceback (most recent call last):
  File "./minetestmapper.py", line 722, in <module>
    static_object_version = readU8(f)
  File "./minetestmapper.py", line 127, in readU8
    return ord(f.read(1))
TypeError: ord() expected a character, but string of length 0 found
Error at (38,-8,-22): ord() expected a character, but string of length 0 found
Block data: 1c 09 ff ff 02 02 78 9c ed c1 31 01 00 00 00 c2 a0 f5 4f 6d 0c 1f a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 b7 01 40 00 00 01 78 9c 63 00 00 00 01 00 01 00 00 00 ff ff ff ff 00 00 01 00 00 00 06 69 67 6e 6f 72 65 0a 00 00 
Data after node metadata: 
Traceback (most recent call last):
  File "./minetestmapper.py", line 722, in <module>
    static_object_version = readU8(f)
  File "./minetestmapper.py", line 127, in readU8
    return ord(f.read(1))
TypeError: ord() expected a character, but string of length 0 found
Drawing image
Saving

Resulting png file is all white.

Any recommendations?

@Poikilos
Copy link
Owner

Poikilos commented Feb 9, 2020

I'm looking into that. I asked the author of minetestmapper-numpy about it, but didn't get a response. I'll discuss it with @OldCoder

@Poikilos
Copy link
Owner

Poikilos commented Feb 10, 2020

I fixed the exception handling, so I can see what is happening better. Both minetestmapper.py and minetestmapper-numpy.py have the same problem. There are no bytes (such as for the first read, which is static_object_version) in dec_o.unused_data where dec_o is the decompressobj. The issue occurs in both sqlite3 and leveldb (tested using the --backend leveldb option with a leveldb world) modes. I don't understand the map format well enough to know why this occurs or fix it, but I'll be working on it. Any help is appreciated.

@Poikilos
Copy link
Owner

The problem happens with some maps such as stampyworld (Feb 16, 2014 20:20) but not other maps such as "Hogwarts & more" (Feb 21, 2015 17:35).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants