Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Discuss and distribute tools and methods for modding. Moderator - Grognak
SuicidalPencil
Posts: 7
Joined: Sun Apr 07, 2013 11:19 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby SuicidalPencil » Mon Apr 08, 2013 12:14 am

Having an issue patching a ship (The Kestrel) in. Here's the error:

2013-04-07 18:24:26 INFO: Installing mod: Kestrel Cruiser.ftl
2013-04-07 18:24:40 ERROR: character mapping must return integer, None or unicode
Traceback (most recent call last):
File "C:\Users\Suicidal Pencil\Desktop\ftl\FTL\Grognaks Mod Manager v1.7 Win32\lib\killable_threading.py", line 99, in run
result = self._payload(*self._payload_args, **self._payload_kwargs)
File "C:\Users\Suicidal Pencil\Desktop\ftl\FTL\Grognaks Mod Manager v1.7 Win32\main.py", line 823, in patch_dats
mod_zip.extract(item, tmp)
File "C:\Python27\lib\zipfile.py", line 1024, in extract
return self._extract_member(member, path, pwd)
File "C:\Python27\lib\zipfile.py", line 1057, in _extract_member
arcname = arcname.translate(table)
TypeError: character mapping must return integer, None or unicode
2013-04-07 18:24:40 INFO:
2013-04-07 18:24:40 INFO: Patching failed.
2013-04-07 18:24:44 INFO:
2013-04-07 18:24:44 INFO: Quitting... (ctrl-break to be rude)
2013-04-07 18:24:44 INFO:
2013-04-07 18:24:45 INFO: Bye


I've tried a complete reinstall but nothing changed. Other mods patch fine. This is a dl link to the .ftl in question.
D: MY SHIP IS ON FIRE!
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby Vhati » Mon Apr 08, 2013 1:58 am

ImplacableTardigrade wrote:Modman refuses to run for me, stating that "No version of python is found on this system".
The modman.exe in GMM 1.7 is broken. Ignore it. That almost never finds python.
Luckily it was just a launcher.


The workaround instructions are for running main.py directly, without the exe.
Vhati wrote:Windows Vista/7/8 insist on only letting admin-apps modify what's in important locations like Program Files.

The mod manager, however it starts, needs to be run as an admin to get around permission complaints.

This is how you run main.py as an admin...
  • Start Menu -> Programs -> Accessories.
  • Right-click "Command Prompt" to run as an admin.
  • Type this, then hit enter: cd "c:\quoted\location\of\GMM"
  • Type this, then hit enter: main.py

If modman.exe hadn't been glitched (it almost never detects python), you could've right-clicked that to run as an admin.
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby Vhati » Mon Apr 08, 2013 4:05 am

SuicidalPencil wrote:Having an issue patching a ship (The Kestrel) in. Here's the error:
TypeError: character mapping must return integer, None or unicode
Other mods patch fine.
Python 2.7.4 came out yesterday and introduced an error that may pop up in random mods now. :?
I've filed a bug report with the Python devs.

A) If that's your mod, what tool did you use to create the zip?
As a workaround, you might try something else until this is fixed. If you find an archiver that doesn't confuse Python, players in your situation would be spared the error.

B) Or install Python 2.7.3 or 3.x.
And recommend the same for players. *sigh*
I'll edit this post after I determine how many other mods are affected...

Edit: Good news. I just scanned all the extant 'working mods', and I think only one will break Python 2.7.4 (StarBug). So this isn't too awful. Can't speak for 'in-development mods' though. I'm pretty sure the technical reason is that offending ftl/zip files contain unicode paths (which depends on the tool used to create them).

C) Third option: 2.7.4 can be fixed.
Open Python27/Lib/ZipFile.py in a text editor.
Search for the word "translate" to skip to line 1057.
Replace this:

Code: Select all

            table = string.maketrans(illegal, '_' * len(illegal))
            arcname = arcname.translate(table)
With this:

Code: Select all

            if isinstance(arcname, unicode):
                table = {ord(c): ord('_') for c in illegal}
            else:
                table = string.maketrans(illegal, '_' * len(illegal))
            arcname = arcname.translate(table)


D) Edit: Hooray! Python 2.7.5 is out and fixes the problem.
So just upgrade if you still have 2.7.4. :D
Last edited by Vhati on Sat May 18, 2013 7:46 pm, edited 5 times in total.
SuicidalPencil
Posts: 7
Joined: Sun Apr 07, 2013 11:19 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby SuicidalPencil » Mon Apr 08, 2013 4:29 am

It was made using KartoFlane's ship editor, SuperLuminal. Any design used produced the same error. I'll put Python 2.7.3 on and report back :D
D: MY SHIP IS ON FIRE!
SuicidalPencil
Posts: 7
Joined: Sun Apr 07, 2013 11:19 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby SuicidalPencil » Mon Apr 08, 2013 5:22 am

Yep, dropped to 2.7.3 and GMM patched perfectly.
D: MY SHIP IS ON FIRE!
Fallenhagrid
Posts: 2
Joined: Mon Apr 08, 2013 9:40 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby Fallenhagrid » Mon Apr 08, 2013 9:48 pm

Hey i need some help please... this is my error report if it can help.

2013-04-08 22:29:13 INFO: Grognak's Mod Manager v1.7.0
2013-04-08 22:29:13 INFO: Platform: Windows-7-6.1.7601-SP1
2013-04-08 22:29:13 INFO: Interpreter: CPython 2.7.4 (32bit)
2013-04-08 22:29:13 INFO:
2013-04-08 22:29:13 INFO: Rooting at: C:\Users\ps3\Documents\My Games\Saved Games\Microsoft Games\games\ZfasterZthanZlightZmodsZ\Grognaks Mod Manager v1.7 Win32
2013-04-08 22:29:13 INFO:
2013-04-08 22:29:13 INFO: Registering ctrl-c handler.
2013-04-08 22:29:13 INFO: Using FTL dats path from config: C:/Program Files (x86)/FTL/resources
2013-04-08 22:29:13 INFO: Added Advanced Battle Systems v1.2.ftl
2013-04-08 22:29:13 INFO: Added Beginning Scrap Advantage.ftl
2013-04-08 22:29:13 INFO: Added Infinite Space_0.4.4 High-res.ftl
2013-04-08 22:29:13 INFO: Added ManualShipUnlocker.ftl
2013-04-08 22:29:14 INFO: Background hashing finished.
2013-04-08 22:29:19 INFO:
2013-04-08 22:29:19 INFO: Patching...
2013-04-08 22:29:19 INFO:
2013-04-08 22:29:19 ERROR: [Errno 13] Permission denied: 'C:/Program Files (x86)/FTL/resources\\data.dat'
Traceback (most recent call last):
File "C:\Users\ps3\Documents\My Games\Saved Games\Microsoft Games\games\ZfasterZthanZlightZmodsZ\Grognaks Mod Manager v1.7 Win32\lib\killable_threading.py", line 99, in run
result = self._payload(*self._payload_args, **self._payload_kwargs)
File "C:\Users\ps3\Documents\My Games\Saved Games\Microsoft Games\games\ZfasterZthanZlightZmodsZ\Grognaks Mod Manager v1.7 Win32\main.py", line 782, in patch_dats
sh.copy2(bak_path, dat_path)
File "C:\Python27\lib\shutil.py", line 130, in copy2
copyfile(src, dst)
File "C:\Python27\lib\shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'C:/Program Files (x86)/FTL/resources\\data.dat'
2013-04-08 22:29:19 INFO:
2013-04-08 22:29:19 INFO: Patching failed.
2013-04-08 22:29:21 INFO:
2013-04-08 22:29:21 INFO: Quitting... (ctrl-break to be rude)
2013-04-08 22:29:21 INFO:
2013-04-08 22:29:22 INFO: Bye

i am trying to just install a single mod but not even the basic mod for gaining scrap wont work (and i have went through the troubleshooting help on the front page, and re-installed This mod, The actual mods AND FTL aswell
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby Vhati » Tue Apr 09, 2013 12:34 am

Fallenhagrid wrote:Hey i need some help please... this is my error report if it can help.
ERROR: [Errno 13] Permission denied: 'C:/Program Files (x86)/FTL/resources\\data.dat'

GMM needs to be run as administrator on Windows 7.
ImplacableTardigrade
Posts: 15
Joined: Sun Apr 07, 2013 10:27 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby ImplacableTardigrade » Tue Apr 09, 2013 4:16 am

ImplacableTardigrade wrote:C:\Program Files (x86)\FTL>modman.exe
Traceback (most recent call last):
File "C:\Program Files (x86)\FTL\main.py", Line 37, in (module)
logfile_handler = logging.filehandler(os.path.join(dir_self,"modman-log.txt"),mode= "w"
File "C:\Python27\lib\logging\_init_.py",line 897, in _init_
StreamHandler._init_(self,self._open())
File "C:\Python27\lib\logging\_init_.py",line 916, in _open
stream = open(self.baseFilename, self.mode)
101Error: [Errno 13] Permission denied: 'C:\\Program Files (x86)\\FTL\\modman-log.txt'


While modman would previously admonish me for not having python installed when I tried to open it, it now opens for an instant then closes. This error report is received when "modman.exe" is typed into normal command prompt (Run as an admin, of course.)
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby Vhati » Tue Apr 09, 2013 5:03 am

ImplacableTardigrade wrote:This error report is received when "modman.exe" is typed into normal command prompt (Run as an admin, of course.)
C:\Program Files (x86)\FTL>modman.exe
[...]
101Error: [Errno 13] Permission denied: 'C:\\Program Files (x86)\\FTL\\modman-log.txt'
Tip: Since v1.6, GMM doesn't need to be copied into FTL's folder. You can put it anywhere now.

If you ran the prompt as an admin (by right-clicking a shortcut to Command Prompt), it's strange that modman would complain about permissions...

Out of curiousity, what does running "main.py" in the same way tell you (admin prompt, cd ..., main.py), instead of "modman.exe"?
Fallenhagrid
Posts: 2
Joined: Mon Apr 08, 2013 9:40 pm

Re: Grognak's Mod Manager v1.7 (Updated March 6, 2013!)

Postby Fallenhagrid » Tue Apr 09, 2013 7:32 am

Vhati wrote:
Fallenhagrid wrote:Hey i need some help please... this is my error report if it can help.
ERROR: [Errno 13] Permission denied: 'C:/Program Files (x86)/FTL/resources\\data.dat'

GMM needs to be run as administrator on Windows 7.


Thanks works great now :D

Who is online

Users browsing this forum: Google [Bot] and 11 guests