ptwz / python_wizard

Command line LPC analysis tool to generate bitstreams for the Texas Instruments TMS5220 chip
MIT License
40 stars 12 forks source link

NameError: name 'CodingTable' is not defined #17

Open LovelyA72 opened 3 years ago

LovelyA72 commented 3 years ago

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\asrock\AppData\Local\Programs\Python\Python39\lib\tkinter__init.py", line 1892, in call return self.func(*args) File "C:\Users\asrock\AppData\Local\Programs\Python\Python39\lib\tkinter\init__.py", line 814, in callit func(*args) File "C:\Software\python_wizard\python_wizard_gui", line 300, in _repeatedly self._readback_table() File "C:\Software\python_wizard\python_wizard_gui", line 285, in _readback_table params = frame.parameters() File "C:\Software\python_wizard\pywizard\FrameData.py", line 37, in parameters self._parameters = self.parametersWithTranslate(False) File "C:\Software\python_wizard\pywizard\FrameData.py", line 47, in parametersWithTranslate parameters["kParameterGain"] = self.parameterizedValueForRMS(self.reflector.rms, translate=translate) File "C:\Software\python_wizard\pywizard\Reflector.py", line 76, in rms return self.codingTable.rms[CodingTable.kStopFrameIndex - 1] NameError: name 'CodingTable' is not defined

ptwz commented 3 years ago

Could you please provide a description on how to reproduce this and some OS and Python information? I'd like to look into it.

LovelyA72 commented 3 years ago

I am using Windows 10 Pro 64bit Just load a large wav file(around 20 sec) and press play.

VishalGohelishere commented 3 years ago

I am getting the same error

VishalGohelishere commented 3 years ago

I am using Windows 10 Home and python 39

ptwz commented 3 years ago

Hmm, strange. I cannot reproduce it on my linux desktop. Have you tested smaller/shorter files?

Please find attached the file I used and try it if this trigger the error: demo_sound.zip

SubhranshuSharma commented 3 years ago

Hmm, strange. I cannot reproduce it on my linux desktop. Have you tested smaller/shorter files?

Please find attached the file I used and try it if this trigger the error: demo_sound.zip

Your file didn't trigger that error but here is a file that gives that error to me on windows 10 untitled.zip

qairulizwan commented 2 years ago

Just an update, i also face the same error, Running with Win10, python 3.9, folllowing this guide with the given 'a.wav' file: https://www.youtube.com/watch?v=KQseCA0nftI&ab_channel=AeroArduino My Error same as @LovelyA72

Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\asrock\AppData\Local\Programs\Python\Python39\lib\tkinterinit.py", line 1892, in call return self.func(args) File "C:\Users\asrock\AppData\Local\Programs\Python\Python39\lib\tkinterinit.py", line 814, in callit func(args) File "C:\Software\python_wizard\python_wizard_gui", line 300, in _repeatedly self._readback_table() File "C:\Software\python_wizard\python_wizard_gui", line 285, in _readback_table params = frame.parameters() File "C:\Software\python_wizard\pywizard\FrameData.py", line 37, in parameters self._parameters = self.parametersWithTranslate(False) File "C:\Software\python_wizard\pywizard\FrameData.py", line 47, in parametersWithTranslate parameters["kParameterGain"] = self.parameterizedValueForRMS(self.reflector.rms, translate=translate) File "C:\Software\python_wizard\pywizard\Reflector.py", line 76, in rms return self.codingTable.rms[CodingTable.kStopFrameIndex - 1] NameError: name 'CodingTable' is not defined

GerardZ commented 2 years ago

Same here... (Win10/python v3.9.6) I want to make my own samples to use in Talkie (Arduino speech lib), dunno if that was you guys' purpose also.

HOWEVER: I did manage to use the command line though ! After installing Scipy I did:

python python_wizard -S -f arduino ..\that_was_easy.wav

Pasted the output in the sketch and succes !

VCoder18 commented 1 year ago

Hello, I had the same problem with the same project (arduino uno, python 3.9, windows 10 pro, same video...) but I solved it so I decided to share that answer as my 1st post on github : 1_Go to the python_wizard\pywizard\Reflector.py file 2_add the line below with in the import part of the file : from .CodingTable import CodingTable 3_run your command to start the wizard and enjoy ; )