question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'list' object has no attribute 'argsort'

See original GitHub issue

Hi, I am running YOLACT++ on a Jetson Xavier and getting the following error not always, but occasionally. What could be the reason for such an error?

Traceback (most recent call last):
  File "eval.py", line 1103, in <module>
    evaluate(net, dataset)
  File "eval.py", line 890, in evaluate
    evalvideo(net, args.video)
  File "eval.py", line 830, in evalvideo
    frame_buffer.put(frame['value'].get())
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "eval.py", line 710, in prep_frame
    return prep_display(preds, frame, None, None, undo_transform=False, class_color=True, fps_str=fps_str)
  File "eval.py", line 155, in prep_display
    idx = t[1].argsort(0, descending=True)[:args.top_k]
AttributeError: 'list' object has no attribute 'argsort'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
enhanycommented, Feb 3, 2020

@serhatiscan do not use multithreading. python eval.py --video_multiframe=1

3reactions
dbolyacommented, Feb 5, 2020

@serhatiscan @enhany’s suggestion should work. I didn’t realize that you were using evalvideo, which uses mulithreading by default. If you want to keep using multithreading (i.e., without setting multiframe to 1) you can just set the global variable to True (by changing 'rescore_bbox': False, in yolact_plus_base_config in data/config.py to 'rescore_bbox': True,). This will break the regular eval mode, but if you’re not computing mAP it should be fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve the AttributeError:'list' object has no attribute ...
'list' object has no attribute 'astype'. My related code is as blow. def _init_mean_std(self, data): data = data.astype( ...
Read more >
AttributeError: 'list' object has no attribute 'astype' | bobbyhadz
The Python "AttributeError: 'list' object has no attribute 'astype'" occurs when we try to call the astype() method on a list.
Read more >
'list' object has no attribute 'values' when we are using append ...
It is basically what the error message says. The problem is this: y =y.values().astype(int). y is a list and lists do not have...
Read more >
numpy.argsort() in Python - GeeksforGeeks
numpy.argsort() function is used to perform an indirect sort along the given axis using the algorithm specified by the kind keyword.
Read more >
How to resolve AttributeError: 'list' object has no attribute 'next ...
How to resolve AttributeError: 'list' object has no attribute 'next' in here. class ListNode: def __init__(self, val=0, next=None): self.val ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found