We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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: cannot pickle '_thread.lock' object
table = PrettyTable()
table = table.get_html_string( attributes={ 'border': 1, 'style': 'border-width: 1px; border-collapse: collapse; text-align: center; padding: 2px;' } )
No exception and functionality to work
Traceback (most recent call last): File "/home/elad/python_projects/vsphere_usage.py", line 246, in <module> print_rps(dc_name=dc, cluster_name=cluster) File "/home/elad/python_projects/vsphere_usage.py", line 214, in print_rps table = table.get_html_string( File "/home/elad/git/ocs-ci/venv/lib64/python3.9/site-packages/prettytable/prettytable.py", line 2021, in get_html_string string = self._get_simple_html_string(options) File "/home/elad/git/ocs-ci/venv/lib64/python3.9/site-packages/prettytable/prettytable.py", line 2060, in _get_simple_html_string rows = self._get_rows(options) File "/home/elad/git/ocs-ci/venv/lib64/python3.9/site-packages/prettytable/prettytable.py", line 1575, in _get_rows rows = copy.deepcopy(self._rows) File "/usr/lib64/python3.9/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/lib64/python3.9/copy.py", line 205, in _deepcopy_list append(deepcopy(a, memo)) File "/usr/lib64/python3.9/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/lib64/python3.9/copy.py", line 205, in _deepcopy_list append(deepcopy(a, memo)) File "/usr/lib64/python3.9/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/lib64/python3.9/copy.py", line 205, in _deepcopy_list append(deepcopy(a, memo)) File "/usr/lib64/python3.9/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/usr/lib64/python3.9/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/usr/lib64/python3.9/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/lib64/python3.9/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/lib64/python3.9/copy.py", line 172, in deepcopy y = _reconstruct(x, memo, *rv) File "/usr/lib64/python3.9/copy.py", line 270, in _reconstruct state = deepcopy(state, memo) File "/usr/lib64/python3.9/copy.py", line 146, in deepcopy y = copier(x, memo) File "/usr/lib64/python3.9/copy.py", line 230, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/lib64/python3.9/copy.py", line 161, in deepcopy rv = reductor(4) TypeError: cannot pickle '_thread.lock' object
Please include code that reproduces the issue.
The best reproductions are self-contained scripts with minimal dependencies.
# code goes here
The text was updated successfully, but these errors were encountered:
Does it still fail if you run the snippet outside of vsphere_usage.py?
vsphere_usage.py
This works fine for me (on another OS and on another version though):
#!/usr/bin/python3 from prettytable import PrettyTable table = PrettyTable() table = table.get_html_string( attributes={ 'border': 1, 'style': 'border-width: 1px; border-collapse: collapse; text-align: center; padding: 2px;' } ) print(table)
Sorry, something went wrong.
No branches or pull requests
What did you do?
table = PrettyTable()
What did you expect to happen?
No exception and functionality to work
What actually happened?
What versions are you using?
Please include code that reproduces the issue.
The best reproductions
are
self-contained scripts
with minimal dependencies.
# code goes here
The text was updated successfully, but these errors were encountered: