Ad
  • Default User Avatar

    Well, at least I got different error messages as you can see, so I thought there should have been something changed. I tried refreshing but it didn't work.

    I just try again, everything works fine now. (more preciously, works well with py2, and well with py3 only after change the range(...) to list(range(...))) :D

  • Default User Avatar

    I can't get the alpha even run print alpha for sample tests.
    Should be caused by changement of CW..

  • Default User Avatar

    No, it's not fixed yet.
    Now I get this when running sample tests:

     STDERR
    Traceback (most recent call last):
      File "main.py", line 14, in <module>
        assert_not_eq([3, 1000])
    TypeError: assert_not_eq() takes at least 2 arguments (1 given)
    
  • Default User Avatar

    I know that my code is not complete and may have errors. I just wonder why it can pass the kata with error raised. I thought it should raise errors which tell me what to modify while I got a sudden pass..

    Since I've not seen such bizarrerie before and I haven't try to create a kata, I don't know if it can be caused by the system or by the testing code. I just want to remind you to check if there's a bug in the testing code. ;)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    In the description,

    calculate_distance(9) #=> 7.3485

    should be 14.6969.

  • Default User Avatar

    I didn't post the error messages just because I think the problem is not why I get such errors (I know that my code might still have bugs), but why I can pass while getting errors at the same time.

    If you think it's useful, here are the output messages:

    Time: 2958ms Passed: 33 Failed: 0
    Test Results:
    Fixed Tests
    Small array
    Array with multiple matches
    Completed in 0.05ms
    Edge Cases
    No match
    One Element Array
    Completed in 0.02ms
    Random Test
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Completed in 1534.49ms
    STDERR
    Process Process-1:
    Traceback (most recent call last):
      File "/usr/local/lib/python3.4/multiprocessing/process.py", line 254, in _bootstrap
        self.run()
      File "/usr/local/lib/python3.4/multiprocessing/process.py", line 93, in run
        self._target(*self._args, **self._kwargs)
      File "main.py", line 108, in some_function
        test.assert_equals(index_equals_value(arr), expected)
      File "/home/codewarrior/solution.py", line 20, in index_equals_value
        t=f(0,n)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 15, in f
        return f(t+1,b)
      File "/home/codewarrior/solution.py", line 5, in f
        if arr[a]==a:return a
    IndexError: tuple index out of range
    You have passed all of the tests! :) 
    
  • Default User Avatar

    (py2) Why I just pass the kata while I get error messages?

  • Default User Avatar

    (using py2.7)
    I don't know why I get

     STDERR
    Traceback (most recent call last):
      File "main.py", line 14, in <module>
        assert_not_eq([3, 1000])
      File "/home/codewarrior/setup.py", line 8, in assert_not_eq
        out1 = sorted(random_ints(*a))
    NameError: global name 'random_ints' is not defined
    

    when running sample tests while final tests all pass.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Python. (I think I used py2.)

    (And I have checked again and again in the dictionary... ;p)

  • Default User Avatar

    As I'm not good at English, I have a stupid question.... Shouldn't 14 be 'fourteen' instead of 'forteen'?

  • Default User Avatar

    I think languages and versions allowed can be set. You may just make py2 unusable I think.

  • Default User Avatar

    It's confusing that the error message tell me nothing about what's going wrong. I can't print anything to try to find out what's wrong. Any code would cause this same error message, even I just submit an empty class, or a class with getattribute. As my code pass the sample tests, I have totally no idea.

    However, at last I pass. The problem seems to be.... again, python2 is not supported?

  • Default User Avatar

    (using py)
    May I ask what it means if I pass the sample tests but get

    Test Results:
    Full Test Suite
    PRELIMINARY TESTS
    Error Detected: Missing or invalid value for Blobservation
    Back to the old drawing board...
    

    when I try to submit?

  • Loading more items...