https://docs.python.org/3/library/tty.html says:
Because it requires the termios module, it will work only on Unix.
i.e. there is no termios for Windows.
Answer from Adrian W on Stack Overflowhttps://docs.python.org/3/library/tty.html says:
Because it requires the termios module, it will work only on Unix.
i.e. there is no termios for Windows.
In my case there was an unnecessary hint from VS Code asking for this import however as said in this thread it does not work on windows environment.
In my case it could be removed without issue.
No module named 'termios'
CS50G: Completely lost on how to submit/set up Github
Mock pty / termios on windows tests - Python Help - Discussions on Python.org
'termios' error?
Hi all,
I just started CS50g after loving CS50 and am totally lost on how I'm meant to:
a) be setting up my own environment (I'm using VS Code as that's what it appears u/coltonoscopy has been using and looks pretty similar to the IDE used in CS50) and b) submitting my assignments.
I've done Assignment 0 for Pong and now don't know how to submit it.
My massive preference is to submit it via submit50 as that's what I'm used to. So I followed the directions over here to install Submit50 in VSCode and using the instructions on the assignment here to get submit50 to work.
So Submit50 installs fine in VSCode, but when I use the command (submit50 games50/assignments/2019/x/0) I get this error:
Traceback (most recent call last):
File "c:\users\gregh\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\gregh\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\gregh\AppData\Local\Programs\Python\Python37-32\Scripts\submit50.exe\__main__.py", line 5, in <module>
File "c:\users\gregh\appdata\local\programs\python\python37-32\lib\site-packages\submit50\__init__.py", line 18, in <module>
CONFIG_LOADER = __import__("lib50").config.Loader("submit50")
File "c:\users\gregh\appdata\local\programs\python\python37-32\lib\site-packages\lib50\__init__.py", line 20, in <module>
from ._api import *
File "c:\users\gregh\appdata\local\programs\python\python37-32\lib\site-packages\lib50\_api.py", line 20, in <module>
import termios
ModuleNotFoundError: No module named 'termios'Any ideas? I've also tried the push via Git and this is what I get, with no change to my GitHub account:
gregh@LAPTOP-EQ9I6310 MINGW64 /c/Program Files (x86)/LOVE/assignments/assignment0 (cs50/games50/assignments/2019/x/0) $ git push https://github.com/me50/ghal055.git games50/assignments/2019/x/0 error: src refspec games50/assignments/2019/x/0 does not match any error: failed to push some refs to 'https://github.com/me50/ghal055.git'
Any ideas? I feel like I really don't know where to go from here as I've set up my coding environment myself for this course which wasn't required in CS50, so I don't know if I've even done that right (though Pong and editing that code works great within VSCode).
Thank you for any help!
The command that I am running is
pyinstaller --log-level DEBUG beforeLogin.py
When I try and run the executable created using command line I get:
Traceback (most recent call last): File "beforeLogin.py", line 2, in <module> ModuleNotFoundError: No module named 'wmi' [18908] Failed to execute script beforeLogin
I am not sure how to build my own .spec file but here is the one created by pyinstaller:
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['beforeLogin.py'],
pathex=['C:\\Users\\prana\\Desktop\\GUIApp'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='beforeLogin',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='beforeLogin')My warn-beforeLogin.txt located in GUIApp\build\beforeLogin :
This file lists modules PyInstaller was not able to find. This does not
necessarily mean this module is required for running you program. Python and
Python 3rd-party packages include a lot of conditional or optional modules. For
example the module 'ntpath' only exists on Windows, whereas the module
'posixpath' only exists on Posix systems.
Types if import:
* top-level: imported at the top-level - look at these first
* conditional: imported within an if-statement
* delayed: imported from within a function
* optional: imported within a try-except-statement
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
yourself tracking down the missing module. Thanks!
missing module named 'multiprocessing.forking' - imported by C:\Users\prana\AppData\Local\Programs\Python\Python38\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_multiprocessing.py (optional)
missing module named 'org.python' - imported by copy (optional), xml.sax (delayed, conditional)
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional), zipimport (top-level)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional), zipimport (top-level)
missing module named _posixshmem - imported by multiprocessing.resource_tracker (conditional), multiprocessing.shared_memory (conditional)
missing module named asyncio.DefaultEventLoopPolicy - imported by asyncio (delayed, conditional), asyncio.events (delayed, conditional)
missing module named termios - imported by tty (top-level), getpass (optional)
missing module named vms_lib - imported by platform (delayed, conditional, optional)
missing module named 'java.lang' - imported by platform (delayed, optional), xml.sax._exceptions (conditional)
missing module named java - imported by platform (delayed)
missing module named _winreg - imported by platform (delayed, optional)
missing module named readline - imported by cmd (delayed, conditional, optional), code (delayed, conditional, optional), pdb (delayed, optional)
missing module named org - imported by pickle (optional)
missing module named posix - imported by os (conditional, optional), shutil (conditional)
missing module named resource - imported by posix (top-level), test.support (optional)
missing module named grp - imported by shutil (optional), tarfile (optional), pathlib (delayed)
missing module named pwd - imported by posixpath (delayed, conditional), shutil (optional), tarfile (optional), pathlib (delayed, conditional, optional), http.server (delayed, optional), webbrowser (delayed), netrc (delayed, conditional), getpass (delayed), distutils.util (delayed, conditional, optional)
missing module named _scproxy - imported by urllib.request (conditional)
missing module named multiprocessing.get_context - imported by multiprocessing (top-level), multiprocessing.pool (top-level), multiprocessing.managers (top-level), multiprocessing.sharedctypes (top-level)
missing module named multiprocessing.TimeoutError - imported by multiprocessing (top-level), multiprocessing.pool (top-level)
missing module named multiprocessing.BufferTooShort - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
missing module named multiprocessing.AuthenticationError - imported by multiprocessing (top-level), multiprocessing.connection (top-level)
missing module named win32evtlog - imported by logging.handlers (delayed, optional)
missing module named win32evtlogutil - imported by logging.handlers (delayed, optional)
missing module named _posixsubprocess - imported by subprocess (optional), multiprocessing.util (delayed)
missing module named multiprocessing.set_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named multiprocessing.get_start_method - imported by multiprocessing (top-level), multiprocessing.spawn (top-level)
missing module named requests - imported by captureImage (top-level), loggedIn (top-level), login (top-level)
missing module named 'selenium.common' - imported by webAutomate (top-level)
missing module named selenium - imported by webAutomate (top-level)
missing module named schedule - imported by webcamPic (top-level), loggedIn (top-level)
missing module named win32api - imported by preventSleep (top-level)
missing module named pyautogui - imported by captureImage (top-level), preventSleep (top-level)
missing module named PIL - imported by captureImage (top-level)
missing module named numpy - imported by captureImage (top-level)
missing module named cv2 - imported by webcamPic (top-level), captureImage (top-level)
missing module named wmi - imported by C:\Users\prana\Desktop\GUIApp\beforeLogin.py (top-level)Could anyone please help me fix this error? Please let me know if there is anything else I can provide to assist with the debugging.