Ad
  • Custom User Avatar

    When trying to submit a solution in python, an error pops up

    Traceback (most recent call last):
    File "/workspace/default/tests.py", line 4, in <module>
        from solution import Molecule, InvalidBond, UnlockedMolecule, LockedMolecule, EmptyMolecule   
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ImportError: cannot import name 'InvalidBond' from 'solution' (/workspace/default/solution.py)
    

    as well as in the sample tests. When I replaced line 2 in the sample tests with from solution import Molecule, the error dissapeared, but the problem remains when trying to submit a solution in the main tests

  • Custom User Avatar

    When I was trying to submit a python solution, it passed all the fixed tests, but when it got to random I got an error

    Traceback (most recent call last):
      File "/workspace/default/tests.py", line 139, in <module>
        for i in range(20): test_fnc(*test_gen(RN(5)+20,RN(6)+7,2))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/workspace/default/tests.py", line 136, in test_fnc
        test.assert_equals(blast_sequence(nx,ny),ref_funk(nx,ny))
                                                 ^^^^^^^^^^^^^^^
      File "/workspace/default/tests.py", line 53, in ref_funk
        mv = zv + y
             ~~~^~~
    TypeError: can only concatenate list (not "int") to list
    

    My solution seems to work with the random test cases, but somehow it still gives the error