HomePage Forums Naomi Support Naomi Stable 2.2 Installation failure issue

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #618

    Hello
    I’m using Naomi to recognize the voice on my Raspberry Pi.

    During installation, the following problems occur and there are difficulties to proceed.

    I chose manual installation because my existing information should not be erased.

    I installed Pocketsphinx STT and Espeak TTS and proceeded with the installation by referring to the homepage.

    I need help.
    Thanks for reading.

    pi@raspberrypi:~ $ python Naomi/Naomi.py
    Traceback (most recent call last):
    File “Naomi/Naomi.py”, line 3, in <module>
    import naomi
    File “/home/pi/Naomi/naomi/__init__.py”, line 2, in <module>
    from .__main__ import main
    File “/home/pi/Naomi/naomi/__main__.py”, line 6, in <module>
    from . import application
    File “/home/pi/Naomi/naomi/application.py”, line 9, in <module>
    from . import audioengine
    File “/home/pi/Naomi/naomi/audioengine.py”, line 5, in <module>
    import slugify
    File “/home/pi/.local/lib/python2.7/site-packages/slugify/__init__.py”, line 1, in <module>
    from slugify.main import Slugify, UniqueSlugify
    File “/home/pi/.local/lib/python2.7/site-packages/slugify/main.py”, line 64, in <module>
    class Slugify(object):
    File “/home/pi/.local/lib/python2.7/site-packages/slugify/main.py”, line 66, in Slugify
    upper_to_upper_letters_re = re.compile(UPPER_TO_UPPER_LETTERS_RE, re.VERBOSE)
    File “/home/pi/.local/lib/python2.7/site-packages/regex/regex.py”, line 348, in compile
    return _compile(pattern, flags, ignore_unused, kwargs)
    File “/home/pi/.local/lib/python2.7/site-packages/regex/regex.py”, line 505, in _compile
    caught_exception.pos)
    regex._regex_core.error: bad character range at position 294 (line 7, column 55)

    #619

    Thank you for trying Naomi! Installation is definitely the hardest part, and I’m sorry you ran into some difficulty.

    The Naomi 2.2 “stable” version is over a year old at this point and is lacking a lot of new features, so I highly recommend using the naomi-dev branch.

    Unfortunately, I am boarding a plane at the moment and am about to be unavailable for the next 8 hours or so, but I’ll be happy to troubleshoot this problem with you when I am back on the ground.

    In the meantime, can you provide some additional details about your setup? Does this error occur as soon as you try to start naomi the first time?

    #620

    I’m still going through the process of installing Naomi 2.2 on my system, and have meetings today and am flying tomorrow, but will be able to do some work this weekend.

    Which version of Raspbian are you using on your Pi? What version Raspberry pi is it?

    Thanks,
    Aaron

    #621

    Yes. I had to install slugify and yaml additionally.
    Also when I ran Populate.py I also got the error mentioned above.

    I am using Raspberry Pi 4 and using Raspbian 10.

    #622

    I was able to get Naomi 2.2 up and running as is. Looking closer at your error message, it appears that the last line being run from the Naomi source code is

    File “/home/pi/Naomi/naomi/audioengine.py”, line 5, in <module>
    import slugify

    I tried to find out what the regex could be that is being referenced, but my system doesn’t even have a regex.py module. I will start with a new virtual Raspbian 10 system and install using the naomi-setup.sh and see if I can recreate this problem.

    #623

    I have tried reinstalling, and it works again, although it appears that I haven’t duplicated your setup. It appears that you have installed your python libraries to your local user account. It also appears that you have installed awesome-slugify rather than slugify, but that seems to work fine for me also.

    This error appears to relate to your python setup, not naomi specifically, but I’ll try to help.

    Could you insert some code into /home/pi/.local/lib/python2.7/site-packages/regex/regex.py just before whatever is triggering the error that shows what the string is that is being processed? It sounds like there is probably an errant dash somewhere, causing regex.py to try to interpret expression as a range.

    Also, if you can use history to get a list of the exact commands you used to install Naomi, that would be helpful.

    Thank you,
    Aaron

    #624

    I believe I have duplicated your setup with the following commands:
    `
    $ git clone https://github.com/NaomiProject/Naomi.git
    $ pip install –user pyyaml
    $ pip install –user awesome-slugify
    $ pip install –user blessings
    $ pip install –user feedparser
    $ pip install –user pytz
    $ pip install –user mad
    $ Naomi/Populate.py

    Language Selector

    DE-Deutsch
    EN-English
    FR-Français

    [?] Select Language: EN-English//
    `

    So it still works fine when I run Populate.py.

    I don’t understand what the problem is with your copy of slugify, or what other programs you have installed on your Pi that might be affecting things, but I think you have four options at this point.

    1) Stay on the Naomi master branch and use the naomi-setup.sh program to install a custom version of python at ~/.naomi/local (this makes setup more difficult because when setting up modules, you have to remember to always use ~/.naomi/local/bin/python instead of python and ~/.naomi/local/bin/pip instead of pip).

    2) Stay on the Naomi master branch and use VirtualEnvWrapper to create a custom python environment. This is easier because you only have to remember to always “workon” the Naomi environment before starting Naomi.

    3) Move to the naomi-dev branch (git fetch origin naomi-dev; git checkout naomi-dev) and use naomi-setup.sh to either create a virtual environment or setup a custom installation of python (creating a virtual environment is recommended because it is easier to work with in general and some users have reported problems when compiling python from source).

    4) Get a new SD card and just install Naomi directly on its own card, then either switch cards when you need to run Naomi, or copy the data/applications you need from the other card once you have a stable Naomi intallation. You might even want to try the pre-set Naobian sd card image.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.