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: AttributeError: 'NoneType' object has no attribute 'modem_bps' #53

Open
sp00ck opened this issue Oct 8, 2021 · 3 comments
Open

Comments

@sp00ck
Copy link

sp00ck commented Oct 8, 2021

$export BITRATE=1200
$amodem -h

Traceback (most recent call last):
  File "/home/user/.local/bin/amodem", line 8, in <module>
    sys.exit(_main())
  File "/home/user/.local/lib/python3.8/site-packages/amodem/__main__.py", line 217, in _main
    config.modem_bps / 1e3, len(config.symbols),
AttributeError: 'NoneType' object has no attribute 'modem_bps'

fedora Linux 5.11.22-100.fc32.x86_64 #1 SMP Wed May 19 18:58:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@evndsn
Copy link

evndsn commented Mar 11, 2022

WSL

$amodem -h
Traceback (most recent call last):
File "/usr/local/bin/amodem", line 6, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3191, in
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3175, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3204, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'amodem==1.15.3' distribution was not found and is required by the application

@ke4ahr
Copy link

ke4ahr commented Jul 31, 2024

This program doesn't support use the way you are trying to use it. This is covered in readme.md.

Look in amodem/config.py and set the environment variable BITRATE answer to one of the selections in that list (see below).


export BITRATE=80

amodem/config.py:

# MODEM configurations for various bitrates [kbps]
bitrates = {
    1: Configuration(Fs=8e3, Npoints=2, frequencies=[2e3]),
    2: Configuration(Fs=8e3, Npoints=4, frequencies=[2e3]),
    4: Configuration(Fs=8e3, Npoints=16, frequencies=[2e3]),
    8: Configuration(Fs=8e3, Npoints=16, frequencies=[1e3, 2e3]),
    12: Configuration(Fs=16e3, Npoints=16, frequencies=[3e3, 5e3]),
    16: Configuration(Fs=16e3, Npoints=16, frequencies=[2e3, 5e3]),
    20: Configuration(Fs=16e3, Npoints=16, frequencies=[2e3, 6e3]),
    24: Configuration(Fs=16e3, Npoints=16, frequencies=[1e3, 6e3]),
    28: Configuration(Fs=32e3, Npoints=16, frequencies=[3e3, 9e3]),
    32: Configuration(Fs=32e3, Npoints=16, frequencies=[2e3, 9e3]),
    36: Configuration(Fs=32e3, Npoints=64, frequencies=[4e3, 9e3]),
    42: Configuration(Fs=32e3, Npoints=64, frequencies=[4e3, 10e3]),
    48: Configuration(Fs=32e3, Npoints=64, frequencies=[3e3, 10e3]),
    54: Configuration(Fs=32e3, Npoints=64, frequencies=[2e3, 10e3]),
    60: Configuration(Fs=32e3, Npoints=64, frequencies=[2e3, 11e3]),
    64: Configuration(Fs=32e3, Npoints=256, frequencies=[3e3, 10e3]),
    72: Configuration(Fs=32e3, Npoints=256, frequencies=[2e3, 10e3]),
    80: Configuration(Fs=32e3, Npoints=256, frequencies=[2e3, 11e3]),
    97: Configuration(Fs=32e3, Npoints=256, frequencies=[1e3]),
    98: Configuration(Fs=32e3, Npoints=256, frequencies=[2e3]),
    99: Configuration(Fs=32e3, Npoints=256, frequencies=[1e3,2e3]),
}

@ke4ahr
Copy link

ke4ahr commented Jul 31, 2024

WSL

$amodem -h Traceback (most recent call last): File "/usr/local/bin/amodem", line 6, in from pkg_resources import load_entry_point File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3191, in @_call_aside File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3175, in _call_aside f(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 3204, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'amodem==1.15.3' distribution was not found and is required by the application

I don't think this is related to the original post. Looks like there is a missing dependency in your installation, or you are not using the correct version of python.

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

3 participants