Closed Theproccy closed 2 years ago
What OS are you using?
What OS are you using?
Windows 10
As far as I am aware this is not an issue with cutie but rather reachar / PyCharm. See https://github.com/magmax/python-readchar/issues/51
Do you agree that this is what is happening?
As far as I am aware this is not an issue with cutie but rather reachar / PyCharm. See https://github.com/magmax/python-readchar/issues/51
Do you agree that this is what is happening?
It works perfectly with the previous version of readchar in PyCharm. So it is the latest update to readchar that has caused this break.
Having you looked at the readchar release notes, the the 3. 0. 5. Update was meant to fix arrow keys on Windows it's possible that this has broken readchar on Windows and hence is causing the issues.
My recommendation for a fix would be to make the the requirements. txt specified version 3.0.4 then cuti will work as intended. Will file a pull request as well as this.
There seems to be two thread about similar problems with readchar https://github.com/magmax/python-readchar/pull/65 https://github.com/magmax/python-readchar/issues/66
Windows is just so error prone, it's unbelievable. I would recommend you to use Linux. I also found out earlier that the keycode map of readchar is not that true.
Windows support of readchar is just poor, because not all versions are supported correctly.
When I last tested it under winfows 10 it still worked though, I'll test it again soon.
you can force the old readchar version in your projects for now, i see no reason to force this for everyone (But I will also make a few tests)
the issue is similar but as my use for that library is a requirement of this one I do not need to use it apart from this I neither understand nor am interested in the tiny changes I just want this library to work for people.
My suggested fix is not a force it is just specified the previous version in the retirements text so it goes from
readchar
to
readchar == 3.0.4
so by default, it would work on Windows platforms. The release details on readchar v3.0.5 are "Fix Windows problem with backspace and arrows codes." as it has broken cutie for me and there are no additional benefits that could be found as this is only a small update. I feel like updating the requirements so that it would use the previous version would not be noticed by anyone and cause cuite to work on windows by default and therefore resolve this issue.
regarding the Linux issue. I do plan on running Linux at the end of win 10 life as I am not a fan of win 11 but to do that I need RTX support and also SteelSeries engine support. I don't like windows and would love to run Linux but the main use for my PC is videogames and they are already a pain to get working properly on my PC (i cant alt tab rainbow 6 siege because it won't display again) and also the lack of support for Linux by Nvidia and video games as a whole is a deal-breaker. Next pc I dual boot at the least.
I just tested cutie with readchar 3.0.5 in a CMD and powershell on windows 10 and @theproccy is correct, version 3.0.5 breaks the list selection.
I will also force version 3.0.4 in my project, but leave the decision if you want to force the version in general to you @Kamik423 .
I have adressed this and the windows side of readchar in generall within https://github.com/magmax/python-readchar/pull/71, but it's still waiting to be merged.
It would be interesting if your issues are also fixed by this PR and if yes, you might want to voice that so it gets merged finally
This does resolve the issue that I was experiencing. I will certainly recommend that your PR gets processed.
Till your PR is merged however I will have to persist with using an older version.
I am a bit uncomfortable with pinning a specific version as python version management is a mess and it might conflict with other packages also requiring readchar. If you are adamant that we should pin it then I can still do it.
But would it now make more sense to wait for the readchar PR? Then everyone experiencing your issue can just update that.
readchar 3.0.5 has the following as its release notes:
"Fix Windows problem with backspace and arrows codes."
However, it completely breaks cutie select. The only changes are to the 4 scan codes for the arrow keys and the scan code for backspace.
At this point i think we have these options:
I will amend my pull request to option 2.
I don't believe that the readchar pull request will be processed anytime soon as has been silent since febuary.
Pull request #27 has been amended
readchar
just releases a new version that should fix this. Please confirm
readchar
just releases a new version that should fix this. Please confirm
It was fixed by update 3.0.6 and has not been broken by 3.1.0.
It was fixed by the custom reqirments.txt that just excludes the one broken version and so got auto-updated. I still recommend that that is pulled in to ensure that there are no future problems with the previous version.
cutie.select is not selecting on use of the arrow keys.
e.g. on the press of the up arrow key cutie will treat that as a press of the return key and advance the program without changing selection.
I reverted to readchar 3.0.4 and the error did not persist and cutie now works as expected.
IDE: pycharm 2021.2 community edition with terminal emulation turned on. Running python 3.9 although the issue persists on 3.7 when using the latest version of readchar.