Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create new bots to a different drive than $tmp #20

Closed
DomNomNom opened this issue Mar 2, 2019 · 3 comments
Closed

Can't create new bots to a different drive than $tmp #20

DomNomNom opened this issue Mar 2, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@DomNomNom
Copy link
Contributor

Log by @badplayz in discord:

Traceback (most recent call last):
  File "src\gevent\greenlet.py", line 766, in gevent._greenlet.Greenlet.run
  File "D:\Games\RlBot\pkgs\eel__init__.py", line 199, in _process_message
    return_val = _exposed_functions[message['name']](*message['args'])
  File "D:\Games\RlBot\Python\lib\site-packages\rlbot_gui\gui.py", line 233, in begin_python_bot
    config_file = bootstrap_python_bot(bot_name, bot_directory)
  File "D:\Games\RlBot\Python\lib\site-packages\rlbot_gui\bot_management\bot_creation.py", line 36, in bootstrap_python_bot
    os.rename(f"{tmpdirname}/RLBotPythonExample-master", f"{bot_directory}/{sanitized_name}")
OSError: [WinError 17] Das System kann die Datei nicht auf ein anderes Laufwerk verschieben: 'C:\Users\Main\AppData\Local\Temp\tmpkrlsijfz/RLBotPythonExample-master' -> './TestBot'
2019-03-02T21:35:53Z <Greenlet at 0x22a49961e18: _process_message({'call': 5.162969103343832, 'name': 'beginpython, <geventwebsocket.websocket.WebSocket object at 0x0)> failed with OSError

bot_creation.py os.rename() seems to be the culprit and we should use shutil.move() instead. See: https://stackoverflow.com/questions/21116510

While you're at it, I'd suggest moving to pathlib.Path rather than string-formatting paths.

@DomNomNom DomNomNom changed the title Can't install bots to a differnt drive than $tmp Can't create new bots to a different drive than $tmp Mar 2, 2019
@Martmists-GH
Copy link
Member

I think the main issue here is that RLBot is being ran from inside a zip without being extracted and $tmp is not at fault. The issue of having bots on a different drive is a serious issue however, but the root of that cause lies in the RLBot framework, not the new GUI.

@DomNomNom
Copy link
Contributor Author

@Martmists What gives you the indication that RLBot is being run from inside a zip file?
I'm not sure why you're putting the blame on the RLBot framework so quickly when it's not in the stacktrace, whereas rlbot_gui is.
This temporary dir and zip file is a GUI process: https://github.com/IamEld3st/RLBotGUI/blob/master/rlbot_gui/bot_management/bot_creation.py#L31

@Martmists-GH
Copy link
Member

My bad, I didn't see the change in title.

@DomNomNom DomNomNom self-assigned this Mar 24, 2019
@DomNomNom DomNomNom added the bug Something isn't working label Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants