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

TypeError: unhashable type: 'dict' #200

Closed
0ldcamel opened this issue Nov 13, 2023 · 4 comments
Closed

TypeError: unhashable type: 'dict' #200

0ldcamel opened this issue Nov 13, 2023 · 4 comments

Comments

@0ldcamel
Copy link

`from tabulate import tabulate
import tabulate_cell_merger.tabulate_cell_merger

table = [['a1', 'b1'], ['a2', 'b2']]
colspan = {(0, 0): 2}
rowspan = {(0, 1): 2}

print(tabulate(table, colspan, rowspan))`

Traceback (most recent call last):
File "xxx/merge.py", line 11, in
print(tabulate(table, colspan, rowspan))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/.local/lib/python3.12/site-packages/tabulate/init.py", line 2118, in tabulate
and tablefmt in multiline_formats
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'dict'

@dmtucker
Copy link
Contributor

@0ldcamel this is not the right place for that.
Try https://github.com/astanin/python-tabulate

@0ldcamel
Copy link
Author

Hello @dmtucker , thank you for your comment. I am new here so I kindly be patient.
I used https://github.com/astanin/python-tabulate and it works fine.

Basically I was trying to merge two cells and tried to use tabulate-cell-merger which is from here: https://pypi.org/project/tabulate-cell-merger/
After a few tries, I went back to the same place https://pypi.org/project/tabulate-cell-merger/. On the left hand side, there are Statistics including Open Issues so I reported the issue there.
I am not sure why should I report the issue at https://github.com/astanin/python-tabulate because Tabulate works fine. It is Tabulate-cell-merger that doesn't work (at least when I tried).

@dmtucker
Copy link
Contributor

@0ldcamel Looks like the author used this project as a template for tabulate-cell-merger and didn't update the project links.
If I were you, I would email llurygalbe@yahoo.com and ask them to correct the bug tracker link on PyPI.

@jeanas
Copy link

jeanas commented Feb 3, 2024

Indeed, this project is a sample Python projects that Python package authors can use as a starting point, it looks like the author of tabulate-cell-merger forgot to update the project URLs. We can't help with your problem, please ask the tabulate-cell-merger author if you're still having this problem. Thanks.

@jeanas jeanas closed this as completed Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants