Unable to run self-test suite - sonos

unable to run self test suite, when trying to run, i am getting below error
python suite_selftest.py --config "C:\Users\Arul\Downloads\PythonSelfTest\smapi\service_configs\smapiConfig.cfg"
Traceback (most recent call last):
File "suite_selftest.py", line 13, in <module>
from utility import ServiceConfigOptionParser
File "C:\Users\Arul\Downloads\PythonSelfTest\smapi\content_workflow\utility.py", line 84
except ItemNotFound, w:
^
SyntaxError: invalid syntax

Since you're getting SyntaxError it looks like you're trying to execute the self-test suite with Python 3.x, it needs to be run with Python 2.7+!

Related

No Module Named "requests" even though I installed it already in pycharm

This is the error i get from command prompt:
Traceback (most recent call last):
File "C:\Users\12103\PycharmProjects\pythonProject1\googlesearch.py", line 9, in
import requests
ModuleNotFoundError: No module named 'requests'
i read somewhere saying it might be the environment or something? help would be great thanks

I install pyaudio many times But not working? ERROR: Cannot uninstall 'PyAudio'

ModuleNotFoundError: No module named 'pyaudio'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\Omkar_Bhatuse\Downloads\VoiceBot\Voice_bot.py", line 15, in
with sr.Microphone() as source:
File "C:\Users\Omkar_Bhatuse\Downloads\VoiceBot\venv\lib\site-packages\speech_recognition_init_.py", line 79, in init
self.pyaudio_module = self.get_pyaudio()
File "C:\Users\Omkar_Bhatuse\Downloads\VoiceBot\venv\lib\site-packages\speech_recognition_init_.py", line 110, in get_pyaudio
raise AttributeError("Could not find PyAudio; check installation")
AttributeError: Could not find PyAudio; check installation
(venv) PS C:\Users\Omkar_Bhatuse\Downloads\VoiceBot>
install it using command prompt then try to use the package from the site-packages folder in the python interrupter

Google-cloud-sdk install failing with in invalid syntax

/home/sohail//google-cloud-sdk/install.sh
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
File "/home/sohail//google-cloud-sdk/bin/bootstrapping/install.py", line 27, in
from googlecloudsdk import gcloud_main
File "/home/sohail//google-cloud-sdk/lib/googlecloudsdk/gcloud_main.py", line 37, in
from googlecloudsdk.command_lib.util.apis import yaml_command_translator
File "/home/sohail//google-cloud-sdk/lib/googlecloudsdk/command_lib/util/apis/yaml_command_translator.py", line 241
if self.spec.async:
^
SyntaxError: invalid syntax
Script execution failed!
Exiting with status 1.

why runtime error happen? After import Mecab

what is problem?
I use python3 windows10 environment is Anaconda
m=MeCab.Tagger("-Ochasen")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\a.sakata\Anaconda3\lib\site-packages\MeCab.py", line 253, in __init__
_MeCab.Tagger_swiginit(self, _MeCab.new_Tagger(*args))
RuntimeError
Your dicrc probably doesn't include the chasen format. This causes the Mecab C lib to die with an error, which results in the runtime error in Python.
I get the same error, and if I run mecab on the command line I get this output:
$ mecab -Ochasen
writer.cpp(63) [!tmp.empty()] unkown format type [chasen]
If you don't get an error on the command line the cause might be something else.

I get "SyntaxError" for rst2pdf command after installing RST2PDF in Windows 7

After I install RST2PDF in Windows 7, and run the command rst2pdf or rst2pdf -h, it says
SyntxError: Invalid syntax
I installed rst2pdf V.93 using PIP and have set the path to scripts in python directory.
Here is the error:
c:>rst2pdf Traceback (most recent call last): File
"C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python35\Scripts\rst2pd
f-script.py", line 9, in
load_entry_point('rst2pdf===0.93.dev-r0', 'console_scripts', 'rst2pdf')() File
"C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python35\lib\site-packa
ges\pkg_resources__init__.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name) File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python35\lib\site-packa
ges\pkg_resources__init__.py", line 2682, in load_entry_point
return ep.load() File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python35\lib\site-packa
ges\pkg_resources__init__.py", line 2355, in load
return self.resolve() File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python35\lib\site-packa
ges\pkg_resources__init__.py", line 2361, in resolve
module = import(self.module_name, fromlist=['name'], level=0) File
"C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python35\lib\site-packa
ges\rst2pdf\createpdf.py", line 695
except ValueError, v:
^ SyntaxError: invalid syntax
The syntax for exception handling changed with python 3: instead of except ValueError, v one must use except ValueError as v.
Apparently, rst2pdf has no support for python3. To use it, you must have python2.7 installed. Some attempts have been made to port rst2pdf, but the efforts seem to have stalled.
Alternatively, you may try to use pandoc, as suggested here