Skip to content

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

Closed

Description

@DomNomNom

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.

Activity

  1. changed the title [-]Can't install bots to a differnt drive than $tmp[/-] [+]Can't create new bots to a different drive than $tmp[/+] on Mar 2, 2019
  2. Martmists-GH commented on Mar 2, 2019

    @Martmists-GH
    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.

  3. DomNomNom commented on Mar 3, 2019

    @DomNomNom
    ContributorAuthor

    @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

  4. Martmists-GH commented on Mar 3, 2019

    @Martmists-GH
    Member

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

  5. self-assigned this
    on Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions