MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

Install MMM-GoogleAssistant on windows, error: argument --credentials: No such file or directory: "***credentials.json"



  • Hi,

    I installed Google Assistant on windows 10 and pass audio and push to talk test, now I got error at the last step:
    assistant.py: error: argument --credentials: No such file or directory: “/c/Users/myname/AppData/Roaming/google-oauthlib-tool/credentials.json”
    I checked this path, I do have credentials.json there.
    And I tried to modify this part in MMM-GoogleAssistant/pi/assistant.py,
    def init_googleAssistant():
    parser = argparse.ArgumentParser(
    formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument(’–credentials’, type=existing_file,
    metavar=‘OAUTH2_CREDENTIALS_FILE’,
    default=’/c/Users/vellm/AppData/Roaming/google-oauthlib-tool/credentials.json’,
    #default=os.path.join(
    # os.path.expanduser("~"), #/AppData/Roaming/google-oauthlib-tool/credentials.json
    # ‘google-oauthlib-tool’,
    # ‘credentials.json’
    #),
    help=‘Path to store and read OAuth2 credentials’)
    I think the issue happened in this line, but I cannot solve it:
    default=’/c/Users/vellm/AppData/Roaming/google-oauthlib-tool/credentials.json’,

    Anyone can tell me how to solve it?
    Thanks!



  • I change this to :
    default=‘C:\Users\myname\AppData\Roaming\google-oauthlib-tool\credentials.json’,

    And another issue appeared:
    $ /c/Users/myname/env/Scripts/python -u assistant.py
    pubnub subscription completed
    Traceback (most recent call last):
    File “assistant.py”, line 140, in
    main()
    File “assistant.py”, line 137, in main
    init_googleAssistant()
    File “assistant.py”, line 131, in init_googleAssistant
    with Assistant(credentials,“873445380749-it4rg69bo0sbrqg69upkorp79m6mbq0d.apps.googleusercontent.com”) as assistant:
    File “C:\Users\myname\env\lib\site-packages\google\assistant\library\assistant.py”, line 90, in init
    self._load_lib()
    File “C:\Users\myname\env\lib\site-packages\google\assistant\library\assistant.py”, line 270, in _load_lib
    self.lib = cdll.LoadLibrary(lib_path)
    File "c:\python38\lib\ctypes_init
    .py", line 451, in LoadLibrary
    return self.dlltype(name)
    File "c:\python38\lib\ctypes_init
    .py", line 373, in init
    self._handle = _dlopen(self._name, mode)
    OSError: [WinError 193] %1 is not a valid Win32 application
    hello from python!!



  • @vivian0239 I don’t think he has tested on windows.

    I suspect the voice reco tool, snowboy, still does not work on windows



  • Thank you for your reply! It’s really bad news.



  • @vivian0239 I am sure @Bugsounet will clarify


  • Module Developer

    snowboy CAN works in windows but with a LOT of modifications and still very too complex

    so i prefer say this: actually there is no way to work under windows environement



  • Thank you for your reply!


  • Module Developer

    best way for using MagicMirror and complex module under windows is virtualization of a linux debian machine

    • virtualbox
    • download linux debian and install it in virtualbox
    • install magicmirror and modules 🙂

    result:

    • full emulation of linux machine
    • all package is compatible with debian because rapsbian Os is make is a modified debian version
    • snowboy works (but not sure this wersion of this module works… because google make a lot of library update)

    at begining, i have coded with this method 😉



  • @Bugsounet will MagicMirror in docker container work?


  • Module Developer

    never try


Log in to reply