Magicbot Autonomous

Just getting going with the Magicbot framework and running into issue when running the code. It fails with some autonomous path issues when running in test mode. I am just using the example code from github. Any thoughts?

___________________________________________________________________________________________________________ test_autonomous[] ____________________________________________________________________________________________________________

control = <pyfrc.test_support.controller.TestController object at 0x067FF970>, fake_time = <pyfrc.test_support.fake_time.FakeTime object at 0x066BAC90>, robot = <main.MyRobot object at 0x06826FF0>, gamedata = ‘’

@pytest.mark.parametrize("gamedata", _gsms if _gsms else [""])
def test_autonomous(control, fake_time, robot, gamedata):
    """Runs autonomous mode by itself"""

    # run autonomous mode for 15 seconds
    control.game_specific_message = gamedata
    control.set_autonomous(enabled=True)
  control.run_test(lambda tm: tm < 15)

C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyfrc\tests\basic.py:28:


C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyfrc\test_support\controller.py:160: in run_test
self._robot.startCompetition()
C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wpilib\samplerobot.py:144: in startCompetition
self.robotInit()
C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\magicbot\magicrobot.py:71: in robotInit
self._automodes = AutonomousModeSelector(“autonomous”)
C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\robotpy_ext\autonomous\selector.py:96: in init
modules_path = os.path.dirname(os.path.abspath(autonomous_pkg.file))


path = None

def abspath(path):
    """Return the absolute version of a path."""
    try:
      return normpath(_getfullpathname(path))

E TypeError: _getfullpathname: path should be string, bytes or os.PathLike, not NoneType

C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\ntpath.py:526: TypeError

What does your folder structure look like?

09/12/2019 05:00 PM 45 .deploy_cfg
09/12/2019 04:35 PM autonomous
09/13/2019 02:20 PM components
09/12/2019 04:35 PM 261 README.md
09/13/2019 07:14 PM 1,141 robot.py
09/13/2019 08:07 PM tests
3 File(s) 1,447 bytes

Basically the same code from the magicbot examples github repository

updated all the code and libraries and now it works. Not sure what exactly it was (hate that !) But at least it’s working.