pyapp icon indicating copy to clipboard operation
pyapp copied to clipboard

Cannot get cowsay example to work

Open erdemoney opened this issue 10 months ago • 2 comments

Hi, I was not able to get the basic example with cowsay working on my machine. When I run cargo build --release the following error.

error: failed to parse lock file at: /home/tibit/pyapp-latest/Cargo.lock

Caused by:
  lock file version 4 requires `-Znext-lockfile-bump`

I attempted to resolve this myself according to advice I found on another GH thread to just bump the version down to fix this and this allowed me to build but the executable created did not work.

tibit@prox-per-vm4-l8:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy
tibit@prox-per-vm4-l8:~$ curl https://github.com/ofek/pyapp/releases/latest/download/source.tar.gz -Lo pyapp-source.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  223k  100  223k    0     0   215k      0  0:00:01  0:00:01 --:--:--  215k
tibit@prox-per-vm4-l8:~$ tar -xzf pyapp-source.tar.gz
tibit@prox-per-vm4-l8:~$ mv pyapp-v* pyapp-latest
tibit@prox-per-vm4-l8:~$ cd pyapp-latest
tibit@prox-per-vm4-l8:~/pyapp-latest$ export PYAPP_PROJECT_NAME=cowsay
tibit@prox-per-vm4-l8:~/pyapp-latest$ export PYAPP_PROJECT_VERSION=6.1
tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo build --release --quiet
error: failed to parse lock file at: /home/tibit/pyapp-latest/Cargo.lock

Caused by:
  lock file version 4 requires `-Znext-lockfile-bump`
tibit@prox-per-vm4-l8:~/pyapp-latest$ hx Cargo.lock
tibit@prox-per-vm4-l8:~/pyapp-latest$
tibit@prox-per-vm4-l8:~/pyapp-latest$
tibit@prox-per-vm4-l8:~/pyapp-latest$
tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo build --release --quiet
tibit@prox-per-vm4-l8:~/pyapp-latest$ mv target/release/pyapp cowsay && chmod +x cowsay
tibit@prox-per-vm4-l8:~/pyapp-latest$ ./cowsay -t 'Hello, World!'

tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo --version
cargo 1.75.0

I get the "creating virtual environment" dialog and then nothing happens.

Note: The cargo version I was running was older (from apt) I tried the newest one from rustup and rebuilt. I no longer get the error from Cargo.lock but running the executable yields the same result.

tibit@prox-per-vm4-l8:~/pyapp-latest$ cargo --version
cargo 1.85.0 (d73d2caf9 2024-12-31)

erdemoney avatar Feb 23 '25 22:02 erdemoney

What version of Rust?

ofek avatar Feb 23 '25 23:02 ofek

Sorry I forgot to include that.

tibit@prox-per-vm4-l8:~$ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)

erdemoney avatar Feb 24 '25 05:02 erdemoney