I am “reverse engineering” Open Source code and I am totally ignorant about Python.
This code runs as is, but won’t run in debug mode due to “version” problem.
The line bellow basically generates an error stating NanoVNASaver module does not exist.
from NanoVNASaver._version import version
I need this code to run in debug and really do not care about the correct value of “version”.
Could somebody please just write a few lines of code (in Python) to “fix” the problem with “version”.
I cannot simply delete it - it is used “down the line”…
YES, I do realize there may be more problems later , but I need to start somewhere.
THANKS
from setuptools_scm import get_version
try:
version = get_version(root=‘…’, relative_to=file)
except LookupError:
** from NanoVNASaver._version import version**
VERSION_URL = (
“https://raw.githubusercontent.com/”
“NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py”
)
INFO_URL = “GitHub - NanoVNA-Saver/nanovna-saver: A tool for reading, displaying and saving data from the NanoVNA”
INFO = f"""NanoVNASaver {version}
This program is licensed under the GNU General Public License version 3
See {INFO_URL} for further details.
“”"