Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/16845#discussion_r99999008
--- Diff: python/pyspark/broadcast.py ---
@@ -82,7 +82,7 @@ def dump(self, value, f):
except pickle.PickleError:
raise
except Exception as e:
- msg = "Could not serialize broadcast: " + e.__class__.__name__
+ ": " + e.message
+ msg = "Could not serialize broadcast: " + e.__class__.__name__
+ ": " + str(e)
--- End diff --
BTW, we should keep in mind that
```python
>>> "" + Exception(u"jörn").message
u'j\xf6rn'
>>> "" + str(Exception(u"jörn"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in
position 1: ordinal not in range(128)
```
this could cause such encoding problem. It'd be really rare case though I
think. It seems this usage is already there in the code base so I assume it is
fine.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]