Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-10-13 05:15:08

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,916/3,460

Help with Pokered's map editor?

Hey guys, I'm trying to get the map editor for Pokered working now that it has been updated. I thought I installed everything from cygwin that it needed to run, and I had the xWin server process running, yet this is what happens when I try to launch it:

Mateo@Mateo-VAIO ~/pokered
$ python extras/pokemontools/map_editor.py red
Traceback (most recent call last):
  File "extras/pokemontools/map_editor.py", line 841, in <module>
    app = init(config=config, version=args.version)
  File "extras/pokemontools/map_editor.py", line 835, in init
    return main(config=config)
  File "extras/pokemontools/map_editor.py", line 822, in main
    root = Tk()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1764, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

Can anyone tell me what exactly is going wrong here?


EDIT: Also, if the problem is just "Cygwin is crap" I can always set up a linux VM or a dual-boot situation if I need it for this kinda stuff.

Last edited by Mateo (2014-10-13 05:25:39)

Offline

#2 2014-10-13 06:09:32

pigdevil2010
New member
Registered: 2014-09-29
Post 6/8

Re: Help with Pokered's map editor?

Tkinter need a desktop gui. Since Cygwin is command line, it can't display the gui window.

I have something like this problem too on Windows.

Traceback (most recent call last):
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 1486, in __call__
    return self.func(*args)
  File "extras/pokemontools/map_editor.py", line 255, in open_map
    self.init_map()
  File "extras/pokemontools/map_editor.py", line 276, in init_map
    self.map = MapRenderer(self.config, parent=self.map_frame, name=self.map_nam
e)
  File "extras/pokemontools/map_editor.py", line 400, in __init__
    self.map = Map(**kwargs)
  File "extras/pokemontools/map_editor.py", line 468, in __init__
    self.tileset = Tileset(config=config)
  File "extras/pokemontools/map_editor.py", line 552, in __init__
    self.get_tiles()
  File "extras/pokemontools/map_editor.py", line 589, in get_tiles
    tile = self.img.crop((x, y, x + self.tile_width, y + self.tile_height))
  File "build\bdist.win32\egg\PIL\Image.py", line 1004, in crop
    self.load()
  File "build\bdist.win32\egg\PIL\ImageFile.py", line 200, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "build\bdist.win32\egg\PIL\Image.py", line 415, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder zip not available

Welp, time to install Linux on VM...

Offline

#3 2014-10-13 22:21:22

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 2,917/3,460

Re: Help with Pokered's map editor?

Update: I got it to launch, but when I try to load a map, the console gives me this:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1486, in __call__
    return self.func(*args)
  File "extras/pokemontools/map_editor.py", line 255, in open_map
    self.init_map()
  File "extras/pokemontools/map_editor.py", line 276, in init_map
    self.map = MapRenderer(self.config, parent=self.map_frame, name=self.map_name)
  File "extras/pokemontools/map_editor.py", line 400, in __init__
    self.map = Map(**kwargs)
  File "extras/pokemontools/map_editor.py", line 468, in __init__
    self.tileset = Tileset(config=config)
  File "extras/pokemontools/map_editor.py", line 552, in __init__
    self.get_tiles()
  File "extras/pokemontools/map_editor.py", line 596, in get_tiles
    self.tiles += [ImageTk.PhotoImage(tile)]
  File "/usr/lib/python2.7/site-packages/PIL/ImageTk.py", line 116, in __init__
    self.paste(image)
  File "/usr/lib/python2.7/site-packages/PIL/ImageTk.py", line 183, in paste
    _imagingtk.tkinit(tk.interpaddr(), 1)
OverflowError: Python int too large to convert to C long

Offline

#4 2014-12-16 07:21:33

daMoose52
Member
Registered: 2014-11-14
Post 14/108
Website

Re: Help with Pokered's map editor?

I'm running into a share of issues as well -

Traceback (most recent call last):
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 1532, in __call__
    return self.func(*args)
  File "extras/pokemontools/map_editor.py", line 181, in new_map
    self.init_map()
  File "extras/pokemontools/map_editor.py", line 210, in init_map
    self.map = Map(self.map_frame, self.map_name, config=self.config)
  File "extras/pokemontools/map_editor.py", line 354, in __init__
    self.tileset = Tileset(self.tileset_id, config=self.config)
  File "extras/pokemontools/map_editor.py", line 427, in __init__
    self.get_tiles()
  File "extras/pokemontools/map_editor.py", line 458, in get_tiles
    tile = self.img.crop((x, y, x + self.tile_width, y + self.tile_height))
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 1004, in crop
    self.load()
  File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 247, in load
    raise_ioerror(e)
  File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 59, in raise_ioerr
or
    raise IOError(message + " when reading image file")
IOError: unrecognized data stream contents when reading image file

Pokemon: Project Neo A Pokemon hack 15 years in the making...

Offline

#5 2014-12-16 09:34:51

comet
Member
Registered: 2012-04-09
Post 494/672

Re: Help with Pokered's map editor?

At one point it was suggested that I use pillow (a PIL fork) for some reason I don't remember that apparently made sense at the time. Some time later the pillow people broke the dependencies on the package index (pip) without telling anyone.

On unix, you only need tk/tcl:

sudo apt-get install tk8.5-dev tcl8.5-dev

I don't think it works on Windows at all, even with Cygwin-X. It was a bad idea to claim it could without testing. I don't remember the specifics but I think it was that pillow broke Cygwin compatibility.

I'd like to get rid of pillow asap but in the end there will probably just be a dedicated Windows map editor.

Last edited by comet (2014-12-16 09:35:09)

Offline

#6 2014-12-16 14:45:44

daMoose52
Member
Registered: 2014-11-14
Post 15/108
Website

Re: Help with Pokered's map editor?

I used to write VB applications, did a couple that read/edited ROMs pretty decently, but that's been ages :/ Otherwise I'd be happy to lend the hand.
Maybe I'll see if one of my old towers has VB 6 yet...old but I know my way around that one.

EDIT: I'm still working on the first cup of coffee BUT: There is a python bit that can take a python program and build an executable out of it. Could someone with all of the needed bits be able to compile it to exe and distribute that??

Last edited by daMoose52 (2014-12-16 14:47:44)


Pokemon: Project Neo A Pokemon hack 15 years in the making...

Offline

Board footer

Powered by FluxBB