Comments (8)
The solution provided by @greger555 is a lifesaver, just one correction:
def read_description(): with open('README.rst') as fd: return fd.read(encoding="utf-8")
def read_description(): with open('README.rst', encoding="utf-8") as fd: return fd.read()
I also found that updating line 38 of platforms.py was necessary in favor of resolving "TypeError: can only concatenate str (not "bytes") to str":
buffer = ''
buffer = b''
from getkey.
C:\Users\Max>pip --version
pip 22.3 from C:\Users\Max\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)
C:\Users\Max>python --version
Python 3.10.8
from getkey.
Have the same issue, don't know the cause
from getkey.
I have the same issue, what to do??
from getkey.
Error message:
C:\Users\jenni>pip install getkey
Collecting getkey
Using cached getkey-0.6.5.tar.gz (13 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\jenni\AppData\Local\Temp\pip-install-p9mfhp1q\getkey_6ed7fb4b1ab34df49be65936692a82df\setup.py", line 37, in
long_description=read_description(),
^^^^^^^^^^^^^^^^^^
File "C:\Users\jenni\AppData\Local\Temp\pip-install-p9mfhp1q\getkey_6ed7fb4b1ab34df49be65936692a82df\setup.py", line 11, in read_description
return fd.read()
^^^^^^^^^
File "C:\Python311\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 876: character maps to
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
C:\Users\jenni>
from getkey.
I also get thes issue:
C:\Users\Gregw>pip install getkey
Collecting getkey
Using cached getkey-0.6.5.tar.gz (13 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\Gregw\AppData\Local\Temp\pip-install-a1k37d3y\getkey_5dedb9269e7d431ea4084ba0440d716e\setup.py", line 37, in
long_description=read_description(),
^^^^^^^^^^^^^^^^^^
File "C:\Users\Gregw\AppData\Local\Temp\pip-install-a1k37d3y\getkey_5dedb9269e7d431ea4084ba0440d716e\setup.py", line 11, in read_description
return fd.read()
^^^^^^^^^
File "C:\Users\Gregw\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 876: character maps to
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
from getkey.
A fix is just installing getkey from the repo, (i think).
from getkey.
this is what helped me:
in getkey, in the setup.py file change the code on line 9 from:
def read_description(): with open('README.rst') as fd: return fd.read()
to:
def read_description(): with open('README.rst') as fd: return fd.read(encoding="utf-8")
wich forces the UTF-8 usage, and is apparently what we need
however this means you have to download getkey manually. Another issue with this is if you try to install getkey again after done this step, it will still error because pip automatically attempts to find the most updated version on pypi and ignores your directory.
To solve this you need to use "pip install -e ." command instead of the infamous "pip install getkey". In order for this to work properly however you need to be in the same folder as the setup.py file lies in wich is usually directly in the getkey folder.
from getkey.
Related Issues (18)
- Error on Windows HOT 1
- Does not work on Windows with Python 3: TypeError
- Does not capture Unicode chars under Windows
- Output is messed after key capture in Linux
- PIP will not install getkey HOT 8
- CANT INSTALL!!!! HOT 1
- Waits for enter key to be pressed HOT 1
- The version and downloads badges on the README are the wrong way around
- Calling getkey(blocking=False) results in missed keyboard inputs HOT 2
- Error installing on Windows HOT 20
- [bug]: trouble installing getkey HOT 1
- Distinguish numpad buttons
- Bug while installing HOT 4
- Error installing on mac same error as window...
- Error while composing docker images: Error initializing standard platform: Cannot use unix platform on non-file-like stream
- Doesn't work well when started from IDLE
- Bug in keys declaration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getkey.