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

CP search fail with noneType error #54

Open
Benvii opened this issue Mar 23, 2019 · 1 comment
Open

CP search fail with noneType error #54

Benvii opened this issue Mar 23, 2019 · 1 comment
Labels

Comments

@Benvii
Copy link
Member

Benvii commented Mar 23, 2019

I've got the following error, it might comes from the lazyness of the client.

Traceback (most recent call last):
  File "/home/opv/venvs/opv/bin/opv-task", line 11, in <module>
    sys.exit(main())
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/__main__.py", line 57, in main
    lastTaskReturn = run(dir_manager_client, db_client, task_name, inputData)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/__main__.py", line 73, in run
    return task.run(options=inputData)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/task/task.py", line 94, in run
    taskOutput = self.runWithExceptions(options=options)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/task/makealltask.py", line 58, in runWithExceptions
    lastTaskReturn = runTask(self._opv_directory_manager, self._client_requestor, "findnearestcp", cp.lot.id)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/utils.py", line 49, in runTask
    return task.run(options=inputData)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/task/task.py", line 94, in run
    taskOutput = self.runWithExceptions(options=options)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/task/findnearestcptask.py", line 151, in runWithExceptions
    cps = self.searchNearestLocatedCp(lot=lot)
  File "/home/opv/venvs/opv/lib/python3.5/site-packages/opv_tasks/task/findnearestcptask.py", line 102, in searchNearestLocatedCp
    if not(s.lot.id_lot == lot.id_lot and s.lot.id_malette == lot.id_malette):
AttributeError: 'NoneType' object has no attribute 'id_lot'

To reproduce it on our cluster :

opv-task makeall '{"id_lot":8737, "id_malette":42}' --debug
@Benvii Benvii added the bug label Mar 23, 2019
@Benvii Benvii self-assigned this Mar 23, 2019
@Benvii
Copy link
Member Author

Benvii commented Mar 23, 2019

Problem comes from the reconstructed sensors that aren't linked to a lot but linked to a panorama.

Here the buggy sensor is 14405-42.

SELECT COUNT(*) from panorama WHERE id_sensors_reconstructed=14405;
 count 
-------
     1

When panorama is present we should use it, I'm going to update it.

@Benvii Benvii removed their assignment Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant