Skip to content

Error in running python setup.py test - NameError: global name 'which' is not defined #4

@EPKok

Description

@EPKok

Hi John,

Thanks for developing fast5tools. I have an error when running python setup.py test. It shows that the global name 'which' is not defined. Part of the error message is shown below:

======================================================================
ERROR: test_get_start_time_template (tests.test_f5class.TestFast5Class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/projects/kokep/kokep/devel/fast5tools/tests/test_f5class.py", line 210, in test_get_start_time_template
    self.f5.get_start_time("template")
  File "/mnt/projects/kokep/kokep/devel/fast5tools/fast5tools/f5class.py", line 963, in get_start_time
    return self.get_read_events_start_time(readtype=which,index=0)
  File "/mnt/projects/kokep/kokep/devel/fast5tools/fast5tools/f5class.py", line 986, in get_read_events_start_time
    return self.f5[self._get_location_path(which,"Events")].attrs["start_time"]
NameError: global name 'which' is not defined

======================================================================
ERROR: test_get_start_time_complement (tests.test_f5class.TestFast5Class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/projects/kokep/kokep/devel/fast5tools/tests/test_f5class.py", line 213, in test_get_start_time_complement
    self.f5.get_start_time("complement")
  File "/mnt/projects/kokep/kokep/devel/fast5tools/fast5tools/f5class.py", line 963, in get_start_time
    return self.get_read_events_start_time(readtype=which,index=0)
  File "/mnt/projects/kokep/kokep/devel/fast5tools/fast5tools/f5class.py", line 986, in get_read_events_start_time
    return self.f5[self._get_location_path(which,"Events")].attrs["start_time"]
NameError: global name 'which' is not defined

======================================================================
ERROR: test_get_start_time_template (tests.test_f5class.TestFast5Class)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/projects/kokep/kokep/devel/fast5tools/tests/test_f5class.py", line 210, in test_get_start_time_template
    self.f5.get_start_time("template")
  File "/mnt/projects/kokep/kokep/devel/fast5tools/fast5tools/f5class.py", line 963, in get_start_time
    return self.get_read_events_start_time(readtype=which,index=0)
  File "/mnt/projects/kokep/kokep/devel/fast5tools/fast5tools/f5class.py", line 986, in get_read_events_start_time
    return self.f5[self._get_location_path(which,"Events")].attrs["start_time"]
NameError: global name 'which' is not defined

----------------------------------------------------------------------
Ran 1360 tests in 20.230s

FAILED (errors=31)
Test failed: <unittest.runner.TextTestResult run=1360 errors=31 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=1360 errors=31 failures=0> 

The full run and error log files are attached below:
run.log
err.log

Wonder how I could fix this issue? Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions