asus-linux-drivers / asus-numberpad-driver

Maintained feature-rich linux driver for NumberPad(2.0) on Asus laptops. NumberPad(2.0) is illuminated numeric keypad integrated to touchpad which appears when is done tap on top right corner of touchpad for atleast 1s by default (configurable) or slide gesture from top right/left corner to the center, the left shows calc app aswell (configurable).
GNU General Public License v2.0
268 stars 21 forks source link

[Bug]: Script numberpad.py execution failed #177

Closed darkpastiurs closed 6 months ago

darkpastiurs commented 6 months ago

Describe the bug

I am experiencing an issue with the asus_numpad_driver service, specifically encountering an error within the numberpad.py script.

Expected behavior

Being able to enable the Numpad functionality on my device by using the specified button on the mousepad.

Relevant log output

File "/usr/share/asus-numberpad-driver/numberpad.py", line 269
    device_id: Optional[str] = None
    ^
SyntaxError: annotated name 'device_id' can't be global
  File "/usr/share/asus-numberpad-driver/numberpad.py", line 269
    device_id: Optional[str] = None
    ^
SyntaxError: annotated name 'device_id' can't be global
  File "/usr/share/asus-numberpad-driver/numberpad.py", line 269
    device_id: Optional[str] = None
    ^
SyntaxError: annotated name 'device_id' can't be global
  File "/usr/share/asus-numberpad-driver/numberpad.py", line 269
    device_id: Optional[str] = None
    ^
SyntaxError: annotated name 'device_id' can't be global
  File "/usr/share/asus-numberpad-driver/numberpad.py", line 269
    device_id: Optional[str] = None
    ^
SyntaxError: annotated name 'device_id' can't be global

Desktop

install-26-04-2024-15-38-11.log

ldrahnik commented 6 months ago

@darkpastiurs Hello, could you please turn english on, try install again and post here install log, I see few errors and I do not want use translator because of wrong translation.

darkpastiurs commented 6 months ago

install-27-04-2024-08-57-11.log

ldrahnik commented 6 months ago

@darkpastiurs Try the latest master and post the log again, please.

darkpastiurs commented 6 months ago

install-27-04-2024-19-16-37.log

ldrahnik commented 6 months ago

It should work now or post error log again please. Second error found in install log is about analytics only. Are you sure your laptop's hardware supports NumberPad? Are you able activate NumberPad on windows?

ldrahnik commented 6 months ago

Closing as the second error in install log was solved. Can be reopened.

darkpastiurs commented 6 months ago

Regarding the question about whether my computer supports the NumberPad, the answer is yes. When I had Windows 11, it was working correctly (a few days ago I formatted my computer and left only OpenSUSE).

The problem persists with the driver. I am sharing the error.log file.

I apologize for the delay in my responses.

ldrahnik commented 6 months ago

@darkpastiurs Could you please try to install&run driver with newer version of python? I use personaly (distro based on Ubuntu22.04) Python 3.10.12. During installation was written to log that you use version 3.6.15. In case OpenSUSE Leap 15.5 does not provider package which can be just updated try to install newer python version directly or using pyenv - in that case read in Readme.md How to install the driver when is used pyenv for managing multiple Python versions? in FAQ

darkpastiurs commented 6 months ago

I have performed the installation with pyenv using the version you mentioned, but it is still not working. I am sharing the installation log install-29-04-2024-08-19-17.log

ldrahnik commented 6 months ago

@darkpastiurs The latest version does not have bc command anymore. Do you use the latest version of this driver from the master branch? Anyway it looks like python 3.6.15 is too old for handling virtual environment for version 3.10.12. As I understand that error. I would recommend directly install python3 in your system and try again in case update package python3 via package manager is not enough.

darkpastiurs commented 6 months ago

I have managed to make it work, however, I had to install Python version 3.11.8, python311-virtualenv, and modify the install.sh file on line 96. I changed virtualenv --python=$(which python3) /usr/share/asus-numberpad-driver/.env to virtualenv-3.11 --python=$(which python3.11) /usr/share/asus-numberpad-driver/.env. Here is the log of the successful installation. install-29-04-2024-10-03-33.log