Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError Exception Value: cannot access local variable 'dtz' where it is not associated with a value #27

Closed
zgypa opened this issue Apr 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@zgypa
Copy link
Member

zgypa commented Apr 26, 2024

model.DicomBase.acquisition_datetime does not take into account a passed datetime which already has tzinfo.

@zgypa zgypa added the bug Something isn't working label Apr 26, 2024
@zgypa
Copy link
Member Author

zgypa commented Apr 29, 2024

the timezone setter of DicomBase is returning an different timezone after setting. I have created TestTimezoneSetterGetter just to test that, and it fails. test_set_timezone() and test_set_timezone2() fail. test_get_timezone() passes. This failure then propagates also to the TestDicomBaseAcquisitionDateTimeSetter.

In addition, in VSCode i cannot run debug: the debug session just keeps spining, and there is this error in Output:

2024-04-29 22:41:27.471 [info] Running DEBUG pytest with arguments: --rootdir=/home/afm/git/open-ortho/dicom4ortho,--capture=no for workspace /home/afm/git/open-ortho/dicom4ortho 

2024-04-29 22:41:27.471 [error] Error while running tests for workspace file:///home/afm/git/open-ortho/dicom4ortho: /home/afm/git/open-ortho/dicom4ortho/test/test_models.py::TestTimezoneSetterGetter::test_get_timezone,/home/afm/git/open-ortho/dicom4ortho/test/test_models.py::TestTimezoneSetterGetter::test_set_and_get_timezone,/home/afm/git/open-ortho/dicom4ortho/test/test_models.py::TestTimezoneSetterGetter::test_set_timezone,/home/afm/git/open-ortho/dicom4ortho/test/test_models.py::TestTimezoneSetterGetter::test_set_timezone2
TypeError: Cannot read properties of undefined (reading 'launchDebugger')


2024-04-29 22:41:41.500 [info] Test run cancelled, resolving 'till EOT' deferred for /home/afm/git/open-ortho/dicom4ortho.
2024-04-29 22:41:41.501 [info] Disposing data receiver for /home/afm/git/open-ortho/dicom4ortho and deleting UUID; pytest execution.
2024-04-29 22:41:41.502 [error] pytest test execution error
 TypeError: Cannot read properties of undefined (reading 'launchDebugger')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant