2015-10-26 19:50:48

I am using python 2.7, and so far all my projects are compiling fine with pyinstaller.  Accessible_output2 is working fine in my python scripts and works fine using pygame.  However it does not compile properly for me.  Is this a known issue? and is there a known solution?  Alternatively,is there a known working combination, such as python3, py2exe and accessible_output2?  Any help appreciated.

Try my free games and software at www.rockywaters.co.uk

2015-10-27 01:52:31

Hi
First, can you explain it in more detail?
Next, I don't use python 2.7
Also, accessible_output 2? Can you tell me the detailed version? How did you install it? Hmmm I've installed accessible_output 0.7.8, by typing easy_install accessible_output.
And remember, accessible_output is not a compiler. It just makes speech. All you have to do is check your code and fix bugs. Also, you need to specify the exact class name when importing the module, like...
From accessible_output import speech
Anyway, please explain in detail. Error messages, pyinstaller version, etc.

2015-10-27 04:54:10

IIRC, accessible_output2 had another dependency? I don't remember what it was, but it's probably on the same site, or pipy. If you can paste any error messages, that might help.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2015-10-27 11:39:15 (edited by dhruv 2015-10-27 11:39:47)

You need libloader and platform_utils. Gotten from the same website you got AO2 from.
You also need to figure out a way to bundle dll files alongside your project. This must be done for AO2 and other products, you can use the interpreter to find out which packages you need to use it with.
You can find the dll files that you need by calling the .find_datafiles() of each package.
I'm not too sure on how you include dll files with pyinstaller, so you might have to do some reading.

This is not a signature.

2015-10-27 19:50:05

Yes, there are 2 dependencies, I installed both platform_utils and libloader before installing AO2.  AO2 is up and working fine.  Pyinstaller produces a distribution folder, it calls dist, for each of my projects that it compiles.  Each project folder comes with the necessary Dll files, and any project I make with AO2 has several Dll files.  I can try to check if Pyinstaller has found them all, but at the moment I have no reason to believe it finds some and not others.  Also the compiled executable does not work even on my computer, whereas the script runs just fine.  I would be very happy if someone has experience of a combination that is up and running.  Ethin replied on another post.  I am hoping he posts here with the magic words something like:  "Python3, pygame and AO2 compile just fine in Pyinstaller".  Cheers folks.

Try my free games and software at www.rockywaters.co.uk

2015-10-27 20:28:54

Does it require something like the MS Visual C++ runtime resistributable?

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2015-10-27 23:03:23

Maybe this thread can help:
http://forum.audiogames.net/viewtopic.p … 42#p178042

2015-10-29 15:49:15

Made progress.  The fault is connected with the autos module.  I can get the AO2 module working and compiling, but not the auto() method from the autos module I was using.  Code to follow, if anyone has a fix for the auto() method let me know:
method1, works and compiles with pyinstaller:
import accessible_output2 as ao2
jaws = ao2.get_output_classes()[2]()
jaws.speak("Jaws test working")
sapi = ao2.get_output_classes()[6]()
sapi.speak("sapi test working")
method2: works fine, but does not compile with pyinstaller:
import accessible_output2.outputs.auto
o = ao2.outputs.auto.Auto()
o.output("default screen reader working?")
I hope the first method proves useful to some one.

Try my free games and software at www.rockywaters.co.uk

2015-10-29 17:17:38

(venv) C:\Users\diggle\projects\scroller>python
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi
n32
Type "help", "copyright", "credits" or "license" for more information.
>>> import accessible_output2 as ao2
>>> datafiles = ao2.find_datafiles()
>>> fileslist = datafiles[0][1]
>>> print filelist
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'filelist' is not defined
>>> print fileslist
['c:\\users\\diggle\\repositories\\accessible_output2\\accessible_output2\\lib\\
dolapi.dll', 'c:\\users\\diggle\\repositories\\accessible_output2\\accessible_ou
tput2\\lib\\nvdaControllerClient32.dll', 'c:\\users\\diggle\\repositories\\acces
sible_output2\\accessible_output2\\lib\\PCTKUSR.dll', 'c:\\users\\diggle\\reposi
tories\\accessible_output2\\accessible_output2\\lib\\PCTKUSR64.dll', 'c:\\users\
\diggle\\repositories\\accessible_output2\\accessible_output2\\lib\\SAAPI32.dll'
]
>>>

Get the files to be put in pyinstaller like that, after that put that in the binaries or datafiles argument of the analysis call in <your main file goes here>spec. That should work.

This is not a signature.

2015-10-29 19:13:23

In accessible output, py2exe_datafiles() had to be sent to the data_files parameter.

data_files = ['sounds', ('blah.wav', 'woot.wav')] + accessible_output.py2exe_datafiles(),

Maybe here it's the same but with ao2.find_datafiles() or accessible_output2.find_datafiles().