boskee / Minecraft

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

AttributeError: 'module' object has no attribute 'getoutput' #86

Closed r58Playz closed 5 years ago

r58Playz commented 5 years ago

AttributeError: 'module' object has no attribute 'getoutput'

r58Playz commented 5 years ago

Traceback (most recent call last): File "main.py", line 18, in from pyglet.gl import File "C:\Python27\lib\site-packages\pyglet\gl__init.py", line 239, in import pyglet.window File "C:\Python27\lib\site-packages\pyglet\window__init__.py", line 1896, in gl._create_shadow_window() File "C:\Python27\lib\site-packages\pyglet\gl__init__.py", line 208, in _create_shadow_window _shadow_window = Window(width=1, height=1, visible=False) File "C:\Python27\lib\site-packages\pyglet\window\win32\init.py", line 134, in init super(Win32Window, self).init__(args, **kwargs) File "C:\Python27\lib\site-packages\pyglet\window__init.py", line 501, in init display = get_platform().get_default_display() File "C:\Python27\lib\site-packages\pyglet\window__init.py", line 1845, in get_default_display return pyglet.canvas.get_display() File "C:\Python27\lib\site-packages\pyglet\canvas__init__.py", line 77, in get_display from pyglet.app import displays File "C:\Python27\lib\site-packages\pyglet\app__init__.py", line 154, in from pyglet.app.base import EventLoop File "C:\Python27\lib\site-packages\pyglet\app\base.py", line 4, in standard_library.install_aliases() File "C:\Python27\lib\site-packages\future\standard_library\init__.py", line 459, in install_aliases import(oldmodname) File "C:\Users\toshi\Minecraft-master\Minecraft-master\commands.py", line 12, in from blocks import BlockID File "C:\Users\toshi\Minecraft-master\Minecraft-master\blocks.py", line 17, in from utils import load_image, make_nbt_from_dict, extract_nbt File "C:\Users\toshi\Minecraft-master\Minecraft-master\utils.py", line 12, in import globals as G File "C:\Users\toshi\Minecraft-master\Minecraft-master\globals.py", line 20, in from pyglet.resource import get_settings_path File "C:\Python27\lib\site-packages\pyglet\resource.py", line 88, in standard_library.install_aliases() File "C:\Python27\lib\site-packages\future\standard_library\init__.py", line 462, in install_aliases obj = getattr(oldmod, oldobjname) AttributeError: 'module' object has no attribute 'getoutput'

Nebual commented 5 years ago

Hmm, amusing how errors can grow in stale projects purely from the passage of time...

As python2.7 enters its final hours, it seems the futures library has started backporting many of Python3's features back to Python2.7 to ease the transition, including renaming several methods from the deprecated 2.7 https://docs.python.org/2/library/commands.html module to follow their Python3 naming conventions. Pyglet uses part of futures, and we use Pyglet. We had a module named commands.py which conflicted with the official one - a simple rename has allowed this ancient project to boot again, though I wouldn't be surprised if it needed more updating.

I'm slightly tempted to rewrite it in Python3, assuming all the dependencies have Python3 equivalents...

r58Playz commented 5 years ago

True. You should rewrite it, to keep the project running.