Error: Could not find a version

I am snapping a python application and then I hit an error:

ERROR: Could not find a version that satisfies the requirement cryptoadvance.specter (from versions: vx.y.z-get-replaced-by-release-script)
ERROR: No matching distribution found for cryptoadvance.specter
Failed to run ‘/home/david/mysnaps/specter-desktop/parts/my-part/install/usr/bin/python3 -m pip install --user --no-compile --no-index --find-links /home/david/mysnaps/specter-desktop/parts/my-part/python-packages protobuf hwi cffi pbkdf2 Jinja2 PySocks mnemonic Click semver pycparser certifi itsdangerous hidapi Werkzeug libusb1 ecdsa MarkupSafe base58 stem chardet idna pyaes noiseprotocol cryptoadvance.specter typing_extensions urllib3 requests daemonize Flask_Login pyserial cryptography Flask_Cors bitbox02 six Flask python_dotenv --upgrade --no-deps’: Exited with code 1.

It’s a long one. Please, what does it mean? Can this be solved?

The lead developer on the project explained that the vx.y.z-get... should be replaced with v0.8.0. This worked. After a little tinkering, the snap is built but I get the following error when I attempt to run it in devmode:

david@david-NUC8i5BEK:~/mysnaps/specter-desktop$ specter-desktop
Initializing HWI...
[2020-09-23 20:00:56,128] INFO in __main__: Logging configured
Traceback (most recent call last):
  File "/snap/specter-desktop/x2/usr/lib/python3.6/", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/snap/specter-desktop/x2/usr/lib/python3.6/", line 85, in _run_code
    exec(code, run_globals)
  File "/snap/specter-desktop/x2/lib/python3.6/site-packages/cryptoadvance/specter/", line 16, in <module>
  File "/snap/specter-desktop/x2/lib/python3.6/site-packages/click/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/snap/specter-desktop/x2/lib/python3.6/site-packages/click/", line 696, in main
  File "/snap/specter-desktop/x2/lib/python3.6/site-packages/click/", line 124, in _verify_python3_env
    ' mitigation steps.' + extra
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Consult for mitigation steps.

This system supports the C.UTF-8 locale which is recommended.
You might be able to resolve your issue by exporting the
following environment variables:

    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8

Click discovered that you exported a UTF-8 locale
but the locale system could not pick up from it because
it does not exist.  The exported locale is "en_AU.UTF-8" but it
is not supported

I’m not quite sure what to do next. Advice gratefully received!

Snap runtime only supports C.UTF-8 locale, you should specify it via the build-environment property.

OOPS: Refer Error: Could not find a version instead

Is that something that can be specified in the yaml?

Check out the build-environment property and its example.

I think this is at runtime, so you actually want environment, not build-environment:

            LANG: C.UTF-8
            LC_ALL: C.UTF-8
1 Like

Yep. Thanks for the correction.

1 Like

Thanks for the helpful suggestion! This fixed the problem. I’m still having trouble using the program now after installing it in --devmode. I wonder if there’s a problem with the command that I specify in the yaml:

      LANG: C.UTF-8
      LC_ALL: C.UTF-8
    command: python3 -m cryptoadvance.specter server --daemon

Or maybe it isn’t running for some other reason. I’ll try to find a log file.

Just a quick note. I removed --daemon from the command in the yaml (and then repackaged and reinstalled the application) and now I can access the GUI at I wonder why that made a difference.

It’s a bit of a problem. I want to run this as a daemon. Any ideas on how to do this?

Just like Docker services, you would actually want it to run in the foreground.

You may collect process output using the snap logs command.