Mac OS X python 2.7.15 AttributeError: 'module' object has no attribute 'map_name'
See original GitHub issueI have a third party python program that imports keyboard.
I did a pip install keyboard and when I saw a Quartz dependency error, I did a pip install pyobc.
When the program wants to receive a key press from me I get:
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/site-packages/keyboard/_darwinkeyboard.py", line 371, in run
Quartz.CFRunLoopRunInMode(Quartz.kCFRunLoopDefaultMode, 5, False)
File "/usr/local/lib/python2.7/site-packages/keyboard/_darwinkeyboard.py", line 400, in handler
self.callback(KeyboardEvent(event_type, scan_code, name=key_name, is_keypad=is_keypad))
File "/usr/local/lib/python2.7/site-packages/keyboard/__init__.py", line 251, in direct_callback
if is_modifier(event.scan_code): self.active_modifiers.add(event.scan_code)
File "/usr/local/lib/python2.7/site-packages/keyboard/__init__.py", line 142, in is_modifier
_modifier_scan_codes.update(*scan_codes)
File "/usr/local/lib/python2.7/site-packages/keyboard/__init__.py", line 141, in <genexpr>
scan_codes = (key_to_scan_codes(name, False) for name in all_modifiers)
File "/usr/local/lib/python2.7/site-packages/keyboard/__init__.py", line 319, in key_to_scan_codes
t = tuple(_collections.OrderedDict((scan_code, True) for scan_code, modifier in _os_keyboard.map_name(normalized)))
AttributeError: 'module' object has no attribute 'map_name'
This same program works apparently for windows users.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
'module' object has no attribute 'fsdecode'; PYTHON 2.7; mac ...
AttributeError : 'module' object has no attribute 'fsdecode'; PYTHON 2.7; mac os X · It says that the 'os' module has no function...
Read more >Install Python, NumPy, SciPy, and matplotlib on Mac OS X
Go to the Python download page and download the package called Python 2.7.2 Mac OS X 64-bit/32-bit x86-64/i386 Installer.
Read more >python3 time module misses attributes in Mac installers
The issue: AttributeError: module 'time' has no attribute 'clock_gettime'. It probably missed other attributes as well.
Read more >'MacOSXOSAScript' object has no attribute 'basename'
AttributeError : 'MacOSXOSAScript' object has no attribute 'basename'.
Read more >AttributeError: 'module' object has no attribute and ImportError
This video covers the AttributeError : ' module ' object has no attribute and ImportError: No module name errors in Python.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the confirmation – not just me then.
Same issue here…