Skip to content

Commit

Permalink
Merge pull request #989 from astrofrog/fix-d3po
Browse files Browse the repository at this point in the history
Fix D3PO and Plotly export in Python 3
  • Loading branch information
astrofrog committed May 18, 2016
2 parents 52d2cd4 + 0165ff7 commit 4a5bf74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ v0.8 (unreleased)
functions by default, and expressions are tested on-the-fly to check that
there are no issues with syntax or undefined variables. [#956]

* Fixed D3PO export when using Python 3. [#989]

* Fixed display of certain error messages when using Python 3. [#989]

v0.7.3 (2015-05-04)
-------------------

Expand Down
6 changes: 3 additions & 3 deletions glue/plugins/export_d3po.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def can_save_d3po(application):

for tab in application.viewers:
for viewer in tab:
if not isinstance(viewer, DISPATCH.keys()):
if not isinstance(viewer, tuple(DISPATCH.keys())):
raise ValueError("D3PO Export only supports scatter "
"and histogram plots")
if sum(len(tab) for tab in application.viewers) == 0:
Expand Down Expand Up @@ -219,8 +219,8 @@ def launch(path):
:param path: The TLD of the bundle
"""
from SocketServer import TCPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
from glue.external.six.moves.socketserver import TCPServer
from glue.external.six.moves.SimpleHTTPServer import SimpleHTTPRequestHandler
from random import randrange
from socket import error
import webbrowser
Expand Down
2 changes: 1 addition & 1 deletion glue/utils/qt/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def wrapper(*args, **kwargs):
try:
return func(*args, **kwargs)
except Exception as e:
m = "%s\n%s" % (msg, e.message)
m = "%s\n%s" % (msg, e.args[0])
detail = str(traceback.format_exc())
qmb = QMessageBox(QMessageBox.Critical, "Error", m)
qmb.setDetailedText(detail)
Expand Down

0 comments on commit 4a5bf74

Please sign in to comment.