boskee / Minecraft

Simple Minecraft-inspired program using Python and Pyglet
MIT License
207 stars 33 forks source link

'ImageData' object has no attribute 'texture' #113

Open BhavayJ opened 3 years ago

BhavayJ commented 3 years ago

when I run the file main.py it says that 'ImageData' object has no attribute 'texture' so what I should do please tell

HenriWahl commented 3 years ago

Same problem here. :cry:

ajh123 commented 3 years ago

Just look through the code and replace .texture with get_texture()

shad0wm1ch commented 3 years ago

@ajh123 It seemed to helped however now I am getting green bars across the screen? I should probably say that I used 2to3 to move everything over to python 3. Any idea what could be the reason?

ajh123 commented 3 years ago

You didn't need to use 2to3, it works. and just change any print "...". to. print("...")

r58Playz commented 3 years ago

I thought that the python3 branch was merged a while ago so that the master branch was compatible with python3. It should be working fine.

On Mon, Dec 28, 2020 at 3:03 AM ajh123 notifications@github.com wrote:

You didn't need to use 2to3, it works. and just change any print "...". to. print("...")

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/boskee/Minecraft/issues/113#issuecomment-751674722, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZAPOE6YT2XCY2JJTJ3GFLSXBQWZANCNFSM4TMU26JQ .

shad0wm1ch commented 3 years ago

image @ajh123 Sorry that was my bad, I don't know why I didn't notice it was already in python 3. Once I change the textures to get_texture thats the program I get. Graphics drivers are up to date, same with python and all the python libraries.

Any idea?

ajh123 commented 3 years ago

Don’t know what’s gone on there, my solution works for me. Maybe the texture files got corrupted?

shad0wm1ch commented 3 years ago

It must be fault on my end then, thanks anyway!

HeyItsAnushtubh commented 3 years ago

Just look through the code and replace .texture with get_texture()

Ummm, where is it? @ajh123

ajh123 commented 3 years ago

Everywhere

d3cryptofc commented 1 year ago

same problem here