robotpy / pyfrc

python3 library designed to make developing RobotPy-based code easier!
MIT License
52 stars 35 forks source link

Deploy fails because os.getlogin fails #220

Closed TheTripleV closed 1 year ago

TheTripleV commented 1 year ago

On Linux mint 21.1, in both the is terminal app and the vscode terminal, deploy fails because the deploy info's os.getlogin() fails with no such device or address on Python 3.10.6.

auscompgeek commented 1 year ago

From the docs for os.getlogin:

Return the name of the user logged in on the controlling terminal of the process. For most purposes, it is more useful to use getpass.getuser() since the latter checks the environment variables LOGNAME or USERNAME to find out who the user is

So if the deploy is somehow run detached from a TTY it'll definitely error.

TheTripleV commented 1 year ago

Yeah it was weird. We tried in the terminal app and in the vscode terminal and they both did that. I didn't look further. I patched his pyfrc to get rid of the call and hardcoded his name.

TheTripleV commented 1 year ago

Closed by #221.