Closed d9394 closed 4 years ago
Using code blocks really helps keeping things readable :wink:
I cannot reproduce the error, at least not with latest develop, the config works fine. Do you have any modifications?
You know what, scratch that. I did copy your example, but I already left out the triple quoted part, thinking it's just comments. At that point I was already making pretty much the same mistake, just the other way round.
Python does not have a way of commenting multiple lines, as many other languages do. The common practice of using triple quotes works in most cases, simply because a string literal without any assignment has no further meaning in code. The sdr configuration, however, is a dictionary, and a the triple quoted string at this position gets concatenated to the first key ("sdrplay"). This breaks the way the profile selection dropdown works since it is not prepared to accept multiple lines of json as its value. This happens behind the scenes, and is only visible using the browser's developer tools.
Easy fix: simply remove the superfluous lines instead of triple quoting them. If you want to keep them for later experiments, the simplest way of disabling one of the sdr devices is by selecting an invalid type (e.g. by prefixing it with disabled_
). Doesn't sound very convincing, but the feature check will make sure very early that such configs are filtered out. I've used this myself on many occasions.
Roger, use 'disabled_rtl' as sdr type config can be ingore by system startup.
my config_webrx.py: