Re: Error saving new leo file in latest Leo from github
On Mon, Nov 3, 2014 at 4:26 PM, Stephen stephen...@gmail.com wrote: I am having trouble saving leo files in a fresh leo cloned from github, with ensure_extension() complaining about concatenating a tuple and str at L2636. Please file a bug report about this. It's important to get a full traceback. This is similar to another bug that I fixed by ignoring tuples. That was probably a mistake, but I didn't have a full traceback in that case either. Edward -- You received this message because you are subscribed to the Google Groups leo-editor group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Error saving new leo file in latest Leo from github
On Tue, Nov 4, 2014 at 7:10 AM, Edward K. Ream edream...@gmail.com wrote: On Mon, Nov 3, 2014 at 4:26 PM, Stephen stephen...@gmail.com wrote: I am having trouble saving leo files in a fresh leo cloned from github, with ensure_extension() complaining about concatenating a tuple and str at L2636. Please file a bug report about this. It's important to get a full traceback. Happily, I have a good test bed on one of my machines. I'll attempt a fix today. Edward -- You received this message because you are subscribed to the Google Groups leo-editor group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Error saving new leo file in latest Leo from github
On Tue, Nov 4, 2014 at 10:40 AM, Edward K. Ream edream...@gmail.com wrote: On Tue, Nov 4, 2014 at 7:10 AM, Edward K. Ream edream...@gmail.com wrote: On Mon, Nov 3, 2014 at 4:26 PM, Stephen stephen...@gmail.com wrote: I am having trouble saving leo files in a fresh leo cloned from github, with ensure_extension() complaining about concatenating a tuple and str at L2636. Fixed at rev bf59164. This is a really, really strange one. QtWidgets.QFileDialog.getSaveFileName returns a tuple, the first of which is the desired file name. The documentation clearly states that the returned result is a QString: http://qt-project.org/doc/qt-5/qfiledialog.html#getSaveFileName File this under one of life's mysteries. Edward -- You received this message because you are subscribed to the Google Groups leo-editor group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Error saving new leo file in latest Leo from github
On Tue, 4 Nov 2014 12:16:52 -0600 Edward K. Ream edream...@gmail.com wrote: On Tue, Nov 4, 2014 at 10:40 AM, Edward K. Ream edream...@gmail.com wrote: On Tue, Nov 4, 2014 at 7:10 AM, Edward K. Ream edream...@gmail.com wrote: On Mon, Nov 3, 2014 at 4:26 PM, Stephen stephen...@gmail.com wrote: I am having trouble saving leo files in a fresh leo cloned from github, with ensure_extension() complaining about concatenating a tuple and str at L2636. Fixed at rev bf59164. This is a really, really strange one. QtWidgets.QFileDialog.getSaveFileName returns a tuple, the first of which is the desired file name. The documentation clearly states that the returned result is a QString: http://qt-project.org/doc/qt-5/qfiledialog.html#getSaveFileName Ditto Qt4. from leo.core.leoQt import QtWidgets x = QtWidgets.QFileDialog.getSaveFileName() x is giving me a string, but your fix works either way, so issue closed :) File this under one of life's mysteries. Yep. Cheers -Terry Edward -- You received this message because you are subscribed to the Google Groups leo-editor group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Error saving new leo file in latest Leo from github
I am having trouble saving leo files in a fresh leo cloned from github, with ensure_extension() complaining about concatenating a tuple and str at L2636. Wrapping the failing line in a try:/except: block to log the problem showed the filename was being passed in as a tuple (name, expected_extension) including the extension selected in the 'Save As' dialog box: unexpected exception in g.ensure_extension with name=('/home/stephen/a/a.leo', 'Leo files (*.leo)') and ext='.leo' Traceback (most recent call last): File /usr/lib/python3.4/site-packages/leo-4.11_final-py3.4.egg/leo/core/leoGlobals.py, line 2639, in ensure_extension return name + ext TypeError: can only concatenate tuple (not str) to tuple As I don't have time right now to trace the root cause, I used this temporary fix: if type( name ) == tuple: name = name[0] to the start of ensure_extension(). Config info at Leo's start-up is: Leo Log Window Leo 5.0d1, build 20141103113053, Mon Nov 3 11:30:53 CST 2014 Not running running from a cloned git repo Python 3.4.1, PyQt version 5.3.1 linux Thanks Stephen -- You received this message because you are subscribed to the Google Groups leo-editor group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.