sugarlabs / Measure

The Sugar Measure activity
GNU General Public License v2.0
1 stars 10 forks source link

Measure Activity Failing to run. #19

Open drLite35 opened 7 months ago

drLite35 commented 7 months ago

Following are the output on log:-

amixer: Unable to find simple control 'DC Mode Enable',0
1709919772.617362 WARNING measure-activity: Problem with amixer set "DC Mode Enable" mute amixer: Unable to find simple control 'V_REFOUT Enable',0
1709919772.664983 WARNING measure-activity: Problem with amixer set "V_REFOUT Enable" unmute amixer: Unable to find simple control 'Mic Boost (+20dB)',0
1709919772.766386 WARNING measure-activity: Problem with amixer set "Mic Boost (+20dB)" unmute amixer: Unable to find simple control 'DC Mode Enable',0
1709919772.866294 WARNING measure-activity: amixer: Could not get DC Mode
amixer: Unable to find simple control 'V_REFOUT Enable',0
1709919772.916730 WARNING measure-activity: amixer: Could not get mic bias voltage. amixer: Unable to find simple control 'Mic Boost (+20dB)',0
1709919773.016803 WARNING measure-activity: amixer: Could not get mic boost Traceback (most recent call last):
File "/usr/bin/sugar-activity3", line 5, in <module>
activityinstance.main()
File "/usr/lib/python3.7/dist-packages/sugar3/activity/activityinstance.py", line 230, in main instance = create_activity_instance(activity_constructor, activity_handle)
O
File "/usr/lib/python3.7/dist-packages/sugar3/activity/activityinstance.py", line 59, in create_activity_insta activity = constructor(handle)
File "/home/user/Activities/Measure/measure.py", line 187, in
self.audiograb
ag(self.wave.new buffer, self)
init
File "/home/user/Activities/Measure/audiograb.py", line 125, in init
self.pipeline.add(self.alsasrc)
TypeError: Argument 1 does not allow None as a value
Exited with status 1, pid 20470 activity id 53d702f16908eb0372466a8f3d74df190d6d00ca

Installed alsa-utils when amixer was missing using this command sudo apt-get alsa-utils

Currently on using command amixer controls this is the output

numid=3, iface-MIXER, name='Master Playback Volume' 
numid=2,iface-MIXER, name='Capture Switch'
numid=1, iface-MIXER, name='Capture Volume' 
quozl commented 7 months ago

Expected. https://help.sugarlabs.org/en/measure.html describes the app. You need audio input to use Measure.

Your amixer controls shows you do not have a microphone or any audio input to which Measure would bind. This is an opportunity to fix the app so that it detects this scenario and gives a helpful message before exiting.

drLite35 commented 7 months ago

Thankyou , Implementing a feature to detect the absence of a microphone and providing a helpful message will definitely enhance the user experience.