Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message on startup #13

Open
WinEunuuchs2Unix opened this issue Jan 21, 2021 · 0 comments
Open

Error message on startup #13

WinEunuuchs2Unix opened this issue Jan 21, 2021 · 0 comments

Comments

@WinEunuuchs2Unix
Copy link

WinEunuuchs2Unix commented Jan 21, 2021

Super cool program. Congrats.

I'm going to try this with Ubuntu 16.04 (Python 2.7.12) so will have to do a little tweaking.

Tweak #1:

Error message on startup:

~/python/audio$ python run_FFT_analyzer.py

Traceback (most recent call last):
  File "run_FFT_analyzer.py", line 2, in <module>
    from src.stream_analyzer import Stream_Analyzer
ImportError: No module named src.stream_analyzer

To fix this error I used:

~/python/audio$ cd src

~/python/audio/src$ echo "" > __init__.py

TWEAK #2:

I'll be revising this comment from time to time as I run into new issues. For example I will need to add program header stub for UTF-8 encoding due to this new error that popped up after fixing above error:

$ python run_FFT_analyzer.py
Traceback (most recent call last):
  File "run_FFT_analyzer.py", line 58, in <module>
    run_FFT_analyzer()
  File "run_FFT_analyzer.py", line 45, in run_FFT_analyzer
    window_ratio = window_ratio  # Float ratio of the visualizer window. e.g. 24/9
  File "/home/rick/python/audio/src/stream_analyzer.py", line 50, in __init__
    from src.stream_reader_sounddevice import Stream_Reader
  File "/home/rick/python/audio/src/stream_reader_sounddevice.py", line 131
SyntaxError: Non-ASCII character '\xf0' in file /home/rick/python/audio/src/stream_reader_sounddevice.py on line 131, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

This is solved by inserting one line:

# -*- coding: utf-8 -*-

TWEAK #3:

The next error that appears:

$ python run_FFT_analyzer.py
Traceback (most recent call last):
  File "run_FFT_analyzer.py", line 58, in <module>
    run_FFT_analyzer()
  File "run_FFT_analyzer.py", line 45, in run_FFT_analyzer
    window_ratio = window_ratio  # Float ratio of the visualizer window. e.g. 24/9
  File "/home/rick/python/audio/src/stream_analyzer.py", line 50, in __init__
    from src.stream_reader_sounddevice import Stream_Reader
  File "/home/rick/python/audio/src/stream_reader_sounddevice.py", line 5, in <module>
    import sounddevice as sd
ImportError: No module named sounddevice

This is more complicated a fix as described here:

Because the solutions provided use pip or pip3 in Ubuntu which won't work because I only sudo apt install the real solution will be more complicated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant