MCP gives error when I attempt to decompile it (1.8.8)

Viewed 29

I'm trying to create my MCP workspace, however, I run into a problem when I run decompile.sh (creates all files). When I run the sh file, it gives me a python error.

Traceback (most recent call last):
  File "runtime/decompile.py", line 58, in decompile
    commands = Commands(conffile, verify=True, no_patch=no_patch, workdir=workdir, json=json)
  File "/Users/louie/Desktop/louie/mcp918/runtime/commands.py", line 176, in __init__
    normalStart = self.readconf(workdir, json)
  File "/Users/louie/Desktop/louie/mcp918/runtime/commands.py", line 565, in readconf
    self.mcLibraries = MinecraftDiscovery.getLibraries(mcDir, self.jsonFile, osKeyword)
  File "/Users/louie/Desktop/louie/mcp918/runtime/MinecraftDiscovery.py", line 157, in getLibraries
    libFilename = "%s-%s-%s.jar"%(libSubdir, libVersion, substitueString(library['natives'][osKeyword]))
  File "/Users/louie/Desktop/louie/mcp918/runtime/MinecraftDiscovery.py", line 185, in substitueString
    str = str.replace("${arch}", getArch())
TypeError: coercing to Unicode: need string or buffer, NoneType found
louie@Louies-MBP mcp918 % 

Any idea of how to fix this? OS: Mac I have python 3 installed I have java 8 installed

1 Answers

Here's the failing code:

def getArch():
    machine = platform.machine()
    if os.name == 'nt' and sys.version_info[:2] < (2,7):
        machine = os.environ.get("PROCESSOR_ARCHITEW6432", os.environ.get('PROCESSOR_ARCHITECTURE', ''))
    machine2bits = {'AMD64': '64', 'x86_64': '64', 'i386': '32', 'x86': '32'}
    return machine2bits.get(machine, None)

def substitueString(str):
    str = str.replace("${arch}", getArch())
    return str

Since you're on an Apple Silicon Mac, you're on the ARM architecture, which MCP918 doesn't support. (This shouldn't be a surprise, since Apple Silicon wasn't released until 5 years after MCP918 was.)

Related