Setting up google assistant on windows PC - windows

I followed instructions in the below link to set up google assistant in my Windows PC.
https://developers.google.com/assistant/sdk/guides/library/python/
But in the step while running the hotword command, i am getting the below error :
Traceback (most recent call last):
File "c:\users\310211247\appdata\local\continuum\miniconda3\lib\runpy.py",line 193, in
_run_module_as_main
"__main__", mod_spec)
File "c:\users\310211247\appdata\local\continuum\miniconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\310211247\AppData\Local\Continuum\miniconda3\Scripts\googlesamples-assistant-hotword.exe\__main__.py", line 5, in <module>
File "c:\users\310211247\appdata\local\continuum\miniconda3\lib\site-packages\googlesamples\assistant\library\hotword.py", line 27, in <module> from google.assistant.library import Assistant
ModuleNotFoundError: No module named 'google.assistant.library'
How can i resolve this error?

As noted in the Compatibility section for the library, it is only supported on linux-armv7l and linux-x86_64 architectures. The library is not expected to work on a Windows device. Instead, you should look at using the service API.

Google's recommendation is to use the assistant service:
The Google Assistant Library for Python is deprecated as of June 28th, 2019
You can configure the assistant following these instructions:
https://developers.google.com/assistant/sdk/guides/service/python/
After installation to get the hotword working you need to install the assistant library:
pip install google-assistant-library
Then you can run the google assistant with the hotword:
googlesamples-assistant-hotword --project-id project --device-model-id model

Related

Using Docker and Compose in Hyper-V with Windows Server 2016

I currently have a Hyper-V Virtual machine whose guest OS is Microsoft Server 2016
I was able to install the Docker Service and use the command line to create a docker image
I would like to try the same process out in Visual Studio using compose, but it looks like that will only work if the ToolBox is installed. I installed the Toolbox and when I build I get an error around the volume spec, I believe this is because the target OS is Linux.
Since Windows Server 2016 is not compatible with Docker for Windows, is it the case that when targeting Windows Containers onc can only use the service + powerhsell, and if they want to use Compose in Visual Studio I would have to disable the hyper-visor internally and make sure the Linux VM is running?
I am a little confused on the workflow regarding windows server + VS with Docker. Thanks for any clarification.
EDIT:
I uninstalled the ToolBox to simplify the environment, I downloaded compose this way:
Invoke-WebRequest " https://github.com/docker/compose/releases/download/1.15.0-rc1/docker-compose-Windows-x86_64.exe" -UseBasicParsing -OutFile $Env:ProgramFiles\docker\docker-compose.exe
And now the build error is:
ERROR: for dockercompose1517717654_azurecontainersite_1 __init__() got an
unexpected keyword argument 'cpu_count'
ERROR: for azurecontainersite __init__() got an unexpected keyword
argument 'cpu_count'
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 68, in main
File "compose\cli\main.py", line 118, in perform_command
File "compose\cli\main.py", line 926, in up
File "compose\project.py", line 424, in up
File "compose\parallel.py", line 69, in parallel_execute
TypeError: __init__() got an unexpected keyword argument 'cpu_count'
Failed to execute script docker-compose.
At this time Visual Studio tools only support Linux Containers. If/when that changes I will update this answer.
Also to get VS with Compose to work on Server 2016, I installed the edge version of Docker for Windows with the following link:
https://store.docker.com/editions/community/docker-ce-desktop-windows

python vlc bindings for windows

I am on Windows, and I wish to use Python Bindings for VLC. I've already downloaded the module from https://github.com/oaubert/python-vlc as per the instruction. But, still I can't import the module.
The error looks like this :
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
import vlc
File "c:\python27\python-vlc-1.1.2\vlc.py", line 173, in <module>
dll, plugin_path = find_lib()
File "c:\python27\python-vlc-1.1.2\vlc.py", line 150, in find_lib
dll = ctypes.CDLL('libvlc.dll')
File "C:\Python27\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found
My aim is to stream the openCV webcam video inside a wxPython window using vlc instance.
I solved the problem myself. I was trying to load a 32-bit dll from a 64-bit process, that's why it doesn't worked out. Finally I am able to fix it by using a 64-bit dll.

Pale Moon addon sdk exception

I try to install my addon in Pale Moon but get this exception:
An exception occurred.
Error: Module `sdk/io/fs` is not found at resource://gre/modules/commonjs/sdk/io/fs.js
resource://gre/modules/commonjs/sdk/loader/cuddlefish.js 133
Traceback (most recent call last):
File "resource://gre/modules/NetUtil.jsm", line 137, in
aCallback(pipe.inputStream, aStatusCode, aRequest);
File "resource://gre/modules/commonjs/sdk/net/url.js", line 49, in readAsync/<
resolve(data);
...(long trace)
So what sdk i must use on pale moon to work with file system?
What version of Firefox is Palemoon based on? If it's very old you shuld try SDK 1.14:
https://ftp.mozilla.org/pub/mozilla.org/labs/jetpack/addon-sdk-1.14.zip
You should also look at the documentation for this version of the SDK ( run cfx docs ) as the current docs on will include modules that have been introduced more recently. sdk/io/fs, for example was only introduced last summer and shipped last fall.

lldb python error

I tried running lldb on my mac and get this at startup:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/embedded_interpreter.py", line 1, in <module>
import readline
ImportError: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_one_line' is not defined
I tried adding the environment variable VERSIONER_PYTHON_PREFER_32_BIT=yes but this error still appears. I'd reckon that the lldb is using a different python environment than it's Mac host so where do I make the change to make it use 32bit mode? thanks.
UPDATE:
I did an arch -i386 lldb and it works in 32-bit. To make it work in 64-bit, I installed a 64-bit version of python readline for OS X but got more problems with native python libraries such as termios and time. So I downloaded python 2.7.3 64-bit installer DMG file and installed its binary; now lldb works in 64 bit finally on my 10.8 mountain lion. Thanks.
It looks like you installed /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so at some point on your system (I don't see it on my Mac OS X 10.7.5 installation, although maybe it's included in 10.8), and that dylib is only built 32-bit. You can confirm with
file /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so
on your system. You could try to force lldb to also run in 32-bit mode (the distribution binary is built 32-/64- universal) but instead I would recommend removing that 32-bit-only readline.so from your system unless you really need it there.
For the sake of anyone else coming to this question looking for a quick fix - Linus Oleander's answer worked for me -- that is, run
pip install six
Hazarding a guess as to why this works, I think this smooths over some python incompatibility issues that lldb is facing when running on machines with a 'non-standard' python installation. This also works when using Homebrew's version of llvm.

Python Ctypes Load Library

I am using windows 7 64 bit machine. I installed Visual studio 2010 and developed a simple win32 dll to add 2 numbers.. The dll is created and i used a test application to test the dll and it works fine..
Now i write python script(shown below) to use this library. But i get the following error message.
Traceback (most recent call last):
File "C:\Users\sbritto\Documents\Visual Studio 2008\Projects\MathFuncsDll\Debug\MathFuncs.py", line 5, in <module>
lib = ctypes.WinDLL('MathFuncsDll.dll',use_last_error=True)
File "C:\Python27\lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application
Python Script
import ctypes
from ctypes import *
#lib = cdll.LoadLibrary("MathFuncsDll.dll")
lib = ctypes.WinDLL('MathFuncsDll.dll',use_last_error=True)
print lib
Kindly let me know ASAP.
Thanks in advance
You'll get this error if you try to open a 64-bit DLL using a Python interpreter compiled for a 32-bit machine, or vice versa. So, if this is a 64-bit DLL you need to make sure you are running a 64-bit Python.

Resources