2018-12-02 18:03:42

hi all, i was trying to run that python-fps thing that kianoosh made and released on github.
here is the huge huge error:
Traceback (most recent call last):
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\opus.py", line 142, in <module>
    libopusfile = ExternalLibrary.load("opusfile")
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\library_loader.py", line 37, in load
    return load_windows(name, paths)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\library_loader.py", line 100, in load_windows
    + ("\n{}" * len(not_supported)).format(*not_supported))
pyogg.library_loader.ExternalLibraryNotSupportedError: library 'opusfile' couldn't be loaded, because the following candidates were not supported:
C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\opusfile.dll
Traceback (most recent call last):
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\opus.py", line 151, in <module>
    libopusenc = ExternalLibrary.load("opusenc")
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\library_loader.py", line 37, in load
    return load_windows(name, paths)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\library_loader.py", line 100, in load_windows
    + ("\n{}" * len(not_supported)).format(*not_supported))
pyogg.library_loader.ExternalLibraryNotSupportedError: library 'opusenc' couldn't be loaded, because the following candidates were not supported:
C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\opusenc.dll
Traceback (most recent call last):
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\flac.py", line 52, in <module>
    libflac = ExternalLibrary.load("flac")
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\library_loader.py", line 37, in load
    return load_windows(name, paths)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\library_loader.py", line 100, in load_windows
    + ("\n{}" * len(not_supported)).format(*not_supported))
pyogg.library_loader.ExternalLibraryNotSupportedError: library 'flac' couldn't be loaded, because the following candidates were not supported:
C:\Users\Ashley Grobler\python 3\lib\site-packages\pyogg\libflac.dll
Traceback (most recent call last):
  File "C:\Users\Ashley Grobler\Desktop\ashley\downloaded github code\python-fps\fps.py", line 17, in <module>
    g.main_menu()
  File "C:\Users\Ashley Grobler\Desktop\ashley\downloaded github code\python-fps\globals.py", line 153, in main_menu
    auto.speak(_("Main menu. Select an item with up and down. Press enter to activate the item"))
  File "C:\Users\Ashley Grobler\Desktop\ashley\downloaded github code\python-fps\AGK\speech\auto.py", line 4, in speak
    speaker = outputs.auto.Auto()
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\accessible_output2-0.13-py3.6.egg\accessible_output2\outputs\auto.py", line 12, in __init__
    self.outputs.append(output())
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\accessible_output2-0.13-py3.6.egg\accessible_output2\outputs\sapi5.py", line 33, in __init__
    self.object = load_com("SAPI.SPVoice")
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\libloader-0.21-py3.6.egg\libloader\com.py", line 15, in load_com
    result = gencache.EnsureDispatch(name)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\win32com\client\gencache.py", line 534, in EnsureDispatch
    mod = EnsureModule(tla[0], tla[1], tla[3], tla[4], bForDemand=bForDemand)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\win32com\client\gencache.py", line 391, in EnsureModule
    module = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\win32com\client\gencache.py", line 266, in GetModuleForTypelib
    AddModuleToCache(typelibCLSID, lcid, major, minor)
  File "C:\Users\Ashley Grobler\python 3\lib\site-packages\win32com\client\gencache.py", line 552, in AddModuleToCache
    dict = mod.CLSIDToClassMap
AttributeError: module 'win32com.gen_py.C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4' has no attribute 'CLSIDToClassMap'

C:\Users\Ashley Grobler\Desktop\ashley\downloaded github code\python-fps>
i am using python 3.6.5, and i already tried to uninstall python, install it again, uninstalled PyOpenAL, uninstalled and installed pyogg, i don't know what to do any more. if any one can help, i would appreciate it alot. thanks and best regards

best regards
never give up on what ever you are doing.

2018-12-02 19:48:29

My first guess is that the dll is malformed or there's an architecture conflict. Have you tried posting an issue on the related GitHub for this?

2018-12-02 20:06:51

Hi, no i did not try that yet. but i will do that as soon as when i have time. thanks

best regards
never give up on what ever you are doing.

2018-12-02 20:45:06

Just uninstall PyOGG and the game should work

2018-12-03 08:10:47

will it not need the dll files to play the ogg files?

best regards
never give up on what ever you are doing.

2018-12-03 09:30:15

Talking about python errors I have another one.
On my mac trying to run the AGK3 examples
Traceback (most recent call last):
  File "play_a_sound.py", line 3, in <module>
    from AGK.audio import sound
  File "/Users/uri/git/agk3/examples/AGK/audio/sound.py", line 1, in <module>
    from attr import attrs, attrib, Factory
ImportError: cannot import name 'attrs' from 'attr' (/usr/local/lib/python3.7/site-packages/attr.py)

Why is attr not workingi I thought htis was part of python?

ReferenceError: Signature is not defined.

2018-12-03 10:00:32

@op
Try deleting %temp%\gen_py, that just might fix it.

@6
Attrs is stupid TBH, 98KB of code I don't need in my app. But it's not included in the stdlib. If your getting an ImportError, first approach should always be trying pip. In your case, pip install attrs

2018-12-03 10:11:15

thanks a lot carter, it worked for me. i had to delete that gen_py folder. i will remember it in future use

best regards
never give up on what ever you are doing.

2018-12-04 15:06:23

so, either AGK3 or pygame doesn't work on OSX?

Check this out
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 460, in __call__
    return self.AS_appdata.target().event(self._code, params, atts, codecs=self.AS_appdata).send(timeout, sendflags)
  File "/usr/local/lib/python3.7/site-packages/aeosa/aem/aemsend.py", line 92, in send
    raise EventError(errornum, errormsg, eventresult)
aem.aemsend.EventError: Command failed: OS error (-1743)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "menu_example.py", line 17, in <module>
    mainmenu()
  File "menu_example.py", line 9, in mainmenu
    obj=m.run("Main menu")
  File "/Users/uri/git/agk3/examples/AGK/misc/menu.py", line 33, in run
    self.speak(intro)
  File "/Users/uri/git/agk3/examples/AGK/misc/menu.py", line 75, in speak
    auto.speak(text)
  File "/Users/uri/git/agk3/examples/AGK/speech/auto.py", line 5, in speak
    speaker.speak(text)
  File "/usr/local/lib/python3.7/site-packages/accessible_output2/outputs/auto.py", line 25, in speak
    output.speak(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/accessible_output2/outputs/voiceover.py", line 15, in speak
    self.app.output(text)
  File "/usr/local/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 496, in __call__
    raise CommandError(self, (args, kargs), e, self.AS_appdata) from e
appscript.reference.CommandError: Command failed:
        OSERROR: -1743
        MESSAGE: OS error
        COMMAND: app('/System/Library/CoreServices/VoiceOver.app').output('Main menu')

ReferenceError: Signature is not defined.

2018-12-04 15:37:06

Na, thats neither aglib nor pygame, its accessible output 2 on os x that doesn't work. It might be necessary to enable external access to VoiceOver to enable speech output via external tools to VO, i'm not sure about it and didn't try to program audio games under OS X yet, but this error is clearly related to a library called aeosa, which seems to be some mac speech library bridging the gap between python and voiceover. Try googling this event code and aeosa, maybe you'll find a solution online.
Then again, accessible output 2 is damn old already, maybe Apple changed something in their latest Mac OS versions, breaking its support for recent Macs.
Best Regards.
Hijacker