pcubillos / bibmanager

A BibTeX manager for LaTeX projects
https://bibmanager.rtfd.io
MIT License
62 stars 13 forks source link

Duplicates error maybe #92

Closed Serenade600 closed 3 years ago

Serenade600 commented 3 years ago

Latest version 1.3.4. I'm not sure I am using it properly. But when using merge function, the following appears. If deleting ISBN duplicates in bibfile , this would not happen.

Traceback (most recent call last):
  File "e:\python\anzhuang\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "e:\python\anzhuang\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\python\anzhuang\Scripts\bibm.exe\__main__.py", line 7, in <module>
  File "e:\python\anzhuang\lib\site-packages\bibmanager\__main__.py", line 1163, in main
    args.func(args)
  File "e:\python\anzhuang\lib\site-packages\bibmanager\__main__.py", line 94, in cli_merge
    bm.merge(bibfile=args.bibfile, take=args.take)
  File "e:\python\anzhuang\lib\site-packages\bibmanager\bib_manager\bib_manager.py", line 844, in merge
    new = read_file(bibfile)
  File "e:\python\anzhuang\lib\site-packages\bibmanager\bib_manager\bib_manager.py", line 620, in read_file
    remove_duplicates(bibs, "isbn")
  File "e:\python\anzhuang\lib\site-packages\bibmanager\bib_manager\bib_manager.py", line 471, in remove_duplicates
    doi_multis = np.where((doi_counts > 1) & (ubib != ""))[0]
ValueError: operands could not be broadcast together with shapes (2,) (5,)
pcubillos commented 3 years ago

Yes, that'a bug. I'll fix it tomorrow. Thanks!