aash29 / pyspeech

Automatically exported from code.google.com/p/pyspeech
0 stars 0 forks source link

unable to import speech module #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I am just trying to install and use the speech module and I have a weird 
problem. Here is what I did:

I installed speech with easy_install and there was no problem with that.
After that I also installed the additional Microsoft Speech SDK 5.1 and 
pywin32 also without problems.
At the end I just copied the code from the home page and I got the 
following error message:

Traceback (most recent call last):
  File "C:/Documents and Settings/jori/Desktop/test_speech.py", line 1, in 
<module>
    import speech
  File "C:\Python25\lib\site-packages\speech-0.5.2-py2.5.egg\speech.py", 
line 63, in <module>
  File "C:\Python25\lib\site-packages\win32com\client\gencache.py", line 
393, in EnsureModule
    module = GetModuleForTypelib(typelibCLSID, lcid, major, minor)
  File "C:\Python25\lib\site-packages\win32com\client\gencache.py", line 
262, in GetModuleForTypelib
    AddModuleToCache(typelibCLSID, lcid, major, minor)
  File "C:\Python25\lib\site-packages\win32com\client\gencache.py", line 
554, in AddModuleToCache
    dict = mod.CLSIDToClassMap
AttributeError: 'module' object has no attribute 'CLSIDToClassMap'

I tried just to import speech without any other code and I got the same 
error.

I've looked at some other posts about deleting the folder gen_py but that 
didn't help either...I am currently using python 2.5 and Windows XP.

Any help will be appreciated.

P.S. I think this project is really cool :)

Original issue reported on code.google.com by georgi.c...@gmail.com on 11 Jul 2009 at 7:00

GoogleCodeExporter commented 9 years ago
I managed to fix the problem. It had something to do with the comments in the 
speech.py 
file so I removed all the comments and it is working now, so thanks anyway. :)

Again, nice project :)

Original comment by georgi.c...@gmail.com on 12 Jul 2009 at 6:34

GoogleCodeExporter commented 9 years ago
Hi, I'm glad to hear that you got things working, and glad you find pyspeech 
useful :)

It's nervewracking to hear that something about the *comments* in a program 
changed
its behavior... why do you think it was the comments?  I'd love to avoid this 
problem
for future users who might not be brave enough to go modify the egg's .py files.

If you have the desire to do a little bug-hunting: if you add back in random
comments, does it break again?  If you put back in the original comments?

Thanks for any more info you can offer -- and if you don't feel like it, don't 
worry
about it :)

Michael

Original comment by gundl...@gmail.com on 14 Jul 2009 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by gundl...@gmail.com on 14 Jul 2009 at 4:20

GoogleCodeExporter commented 9 years ago
hi,
thanks for the reply. I am not sure whether the program was failing to run 
because of 
the comments in it but I really tried everything to get it to work - I 
reinstalled the 
SDK kit like like 5 times and pywin as well but nothing seemed to work. I 
noticed that 
you are using quotes "" instead of the standard # for your comments, is there 
any 
difference btw them? (I've only been programming in python for a year so I am 
still new 
to the language :) ) 

I added a few comments of my own using the # notation to try your code and it 
works now 
so I am still unsure whether that caused the error in the prog:)

Original comment by georgi.c...@gmail.com on 14 Jul 2009 at 10:17

GoogleCodeExporter commented 9 years ago
OK, weird.  Closing as mysteriously fixed.

Original comment by gundl...@gmail.com on 17 Jul 2009 at 2:59

GoogleCodeExporter commented 9 years ago
Can you re-open this? I am on a x64 platform and installed the same way and am 
getting the exact same error. 

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import speech
  File "C:\Python25\lib\site-packages\speech-0.5.2-py2.5.egg\speech.py", line 63, in <module>
  File "C:\Python25\Lib\site-packages\win32com\client\gencache.py", line 407, in EnsureModule
    module = GetModuleForTypelib(typelibCLSID, tlbAttr[1], tlbAttr[3], tlbAttr[4])
  File "C:\Python25\Lib\site-packages\win32com\client\gencache.py", line 262, in GetModuleForTypelib
    AddModuleToCache(typelibCLSID, lcid, major, minor)
  File "C:\Python25\Lib\site-packages\win32com\client\gencache.py", line 554, in AddModuleToCache
    dict = mod.CLSIDToClassMap
AttributeError: 'module' object has no attribute 'CLSIDToClassMap'

Original comment by DaltonCa...@gmail.com on 11 Feb 2011 at 3:20

GoogleCodeExporter commented 9 years ago
Sure thing :)  Unfortunately I have no x64 platform on which to test, and I am 
spending all my time on chromeadblock.com lately, so the only solution I have 
for this is "patches welcome".

Original comment by gundl...@gmail.com on 11 Feb 2011 at 3:31

GoogleCodeExporter commented 9 years ago
Note to self: A good fix would be to try/except this block of code with a 
helpful message telling users what to do to fix the problem.  I bet I knew the 
answer to this at some time in the last 3 years and have forgotten it...

Original comment by gundl...@gmail.com on 11 Feb 2011 at 3:32

GoogleCodeExporter commented 9 years ago
I tryed to erase the comments without sucess. I'm having the same problem. Can 
someone help?

Original comment by phcpo...@gmail.com on 18 Jan 2013 at 7:39

GoogleCodeExporter commented 9 years ago
Ops....solved this issue after installing dragonfly and natlink. Still don´t 
know why or how...

Original comment by phcpo...@gmail.com on 19 Jan 2013 at 12:19