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

Various issues when trying to codexctl install #106

Open
bkirwi opened this issue Dec 12, 2024 · 6 comments
Open

Various issues when trying to codexctl install #106

bkirwi opened this issue Dec 12, 2024 · 6 comments

Comments

@bkirwi
Copy link
Contributor

bkirwi commented Dec 12, 2024

Hi! Tried to get myself set up with codexctl this evening, and I ran into a handful of issues. Some of these may be me holding things wrong, but a couple of them are definitely bugs.

1

When running codexctl install toltec or similar, I get:

Version 3.3.2.1666 not found. Attempting to download
2024-12-11 22:24:10.943 | ERROR    | codexctl.updates:download_version:192 - Download folder ./updates does not exist! Creating it now.
Traceback (most recent call last):
  File "/tmp/onefile_7587_1733973835_132679/main.py", line 12, in <module>
  File "/tmp/onefile_7587_1733973835_132679/codexctl/__init__.py", line 479, in main
  File "/tmp/onefile_7587_1733973835_132679/codexctl/__init__.py", line 289, in call_func
  File "/tmp/onefile_7587_1733973835_132679/codexctl/updates.py", line 208, in download_version
SystemError: Hardware version does not exist! (rm1,rm2,rmpp)

This happens whether I'm running on the rm itself or on another machine. (Though in the latter case I don't actually have any idea how it's inferring the correct version.) Other commands let me specify a particular --hardware, but this one doesn't, so I have no way to figure out what it's seeing here and AFAIK to override it.

2

When trying to install from a particular file, I get:

Failed to get the version number from the filename, please enter it: 3.3.2.1666
Traceback (most recent call last):
  File "/home/bkirwi/Code/codexctl/main.py", line 12, in <module>
    main()
  File "/home/bkirwi/Code/codexctl/codexctl/__init__.py", line 472, in main
    man.call_func(args.command, vars(args))
  File "/home/bkirwi/Code/codexctl/codexctl/__init__.py", line 231, in call_func
    version_number = version_number.group()
                     ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'group'

The version_number.group() call seems like an error: when specified manually it is a string, not a match object.

3

A couple other things that were unclear to me:

  • You provide a build compiled for the RM, but that still tries to connect over SSH. Is that necessary if it's running locally? Seems like running locally may be a bad idea?
  • I couldn't seem to get an SSH key working, and ended up using a password instead. Part of this was a permissions issue - the isfile check returns the same whether the path is invalid or a directory or unreadable for other reasons, it seems. Possible any remaining issues are on my end!
@bkirwi
Copy link
Contributor Author

bkirwi commented Dec 12, 2024

Let me know if there's any other info you'd need to chase these down! (And sorry for the long list... wanted to write everything up while it was still fresh.)

@Jayy001
Copy link
Owner

Jayy001 commented Dec 12, 2024

Hi, appreciate the detailed issue. I've put a couple fixes in, which should hopefully make a change. The hardware version should also be put in the error message, could you put that here please? What ReMarkable device are you running on? Are you running from source, the pypi package or binary?

You provide a build compiled for the RM, but that still tries to connect over SSH. Is that necessary if it's running locally? Seems like running locally may be a bad idea?

This is not intentional, it thinks its being ran from a remote device for some reason. The patch should hopefully fix it? There haven't been any problems with running it locally, so it seems the rewrite broke it :/

I couldn't seem to get an SSH key working, and ended up using a password instead. Part of this was a permissions issue - the isfile check returns the same whether the path is invalid or a directory or unreadable for other reasons, it seems. Possible any remaining issues are on my end!

What permissions does the file have? It should be readable by the program.

Thanks!

@Jayy001
Copy link
Owner

Jayy001 commented Dec 12, 2024

It may take a couple hours for the new binary to be compiled

@NumericalPie
Copy link

Thank you very much! Both of you.

@bkirwi
Copy link
Contributor Author

bkirwi commented Dec 13, 2024

Hi, appreciate the detailed issue. I've put a couple fixes in, which should hopefully make a change.

Thanks for the extremely quick turnaround! Some answers to your questions...

The hardware version should also be put in the error message, could you put that here please?

reMarkable: ~/ cat /sys/devices/soc0/machine
reMarkable 2.0

(That's the info you're looking for, yeah?)

The patch should hopefully fix it?

I'll try it out when I get a chance!

What permissions does the file have?

I think the file permissions were fine but the permissions for the directory it was in were locked down. Which is my fault! If there's anything to change it might be to change the error message from "Invalid path given" to say more about what might be wrong (IIUC, file does not exist or has wrong permissions) -- or possibly to just delete the check? Assuming that the SSH library you're using fails with a sufficiently useful error in that case.

@bkirwi
Copy link
Contributor Author

bkirwi commented Jan 5, 2025

The patch should hopefully fix it?

It sadly did not! But I think I found the issue - see the linked PR.

Jayy001 added a commit that referenced this issue Jan 8, 2025
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