Bernhard Reiter
2006-Nov-18 10:34 UTC
[Weft QDA users] export does not work (1.0.1 on GNU/Linux Mandriva)
Hi Alex, Hi everybody, here is the next technical difficulty with weft-qda: Export to HTML (or txt) does not work. I have identified and fixed one problem of the code when using PageTemplate 2.2.3. Still it does not work. My notes are following. As rubyforge was done in the last hour or so I could not check if thre are already issue reports or a new version in a code repository. Thanks in advance, Bernhard 20061118 Bernhard Trying to export something with weft-qda results into: /usr/lib/ruby/gems/1.8/gems/PageTemplate-2.2.3/lib/PageTemplate/parser.rb:237:in `initialize'': undefined method `compact'' for "/opt/weft-qda-20060mdk/weft_qda-1 .0.1/share/templates":String (NoMethodError) from /usr/lib/ruby/gems/1.8/gems/PageTemplate-2.2.3/lib/PageTemplate/par ser.rb:542:in `new'' from /usr/lib/ruby/gems/1.8/gems/PageTemplate-2.2.3/lib/PageTemplate/par ser.rb:542:in `initialize'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/filters/templates.rb :43:in `new'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/filters/templates.rb :43:in `write'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:370:in `on_ export'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:369:in `ope n'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:369:in `on_ export'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:367:in `bus y'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:367:in `on_ export'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:141:in `cre ate_menus'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:140:in `add _item'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui/workarea.rb:33 0:in `call'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:53:in `main _loop'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/wxgui.rb:53:in `main _loop'' from /opt/weft-qda-20060mdk/weft_qda-1.0.1/weft-qda.rb:60 Examination shows that parser.rb expect a hash to use .compact on, but @args seems to contain a string. Hypothesis: The infection happens in /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/filters/templates.rb:43 tpl = PageTemplate::Parser.new(''source'' => CommentStrippingFileSource, ''include_paths'' => TEMPLATES_DIR, ''preprocessor'' => ExtendedPreprocessor ) as ''include_paths'' will be interpreted as hash directly in /usr/lib/ruby/gems/1.8/gems/PageTemplate-2.2.3/lib/PageTemplate/parser.rb:237 def initialize(args = {}) @args = args if @args[''include_paths''] @paths = @args[''include_paths''] elsif @args[''include_path''] @paths = [ @args[''include_path''] ] Constructive proof: Try with ''include_path'' => TEMPLATES_DIR, Now HTML export works, but the files itself do not contain contents. Might be a different version of PageTemplate. :/ There is another minor issue: The file name endings to get two dots ending up like "document-README..html". -- Professional Service for Free Software (intevation.net) The FreeGIS Project (freegis.org) FSFE (fsfeurope.org)
Bernhard Reiter
2006-Dec-04 10:42 UTC
[Weft QDA users] export does not work (1.0.1 on GNU/Linux Mandriva)
On Saturday 18 November 2006 11:34, Bernhard Reiter wrote:> here is the next technical difficulty with weft-qda: > Export to HTML (or txt) does not work.This probably is [#4293] Export doesn''t work with UTF-8 text on Linux http://rubyforge.org/tracker/index.php?func=detail&aid=4293&group_id=665&atid=2625 Does export work for somebody on GNU/Linux? With which version of PageTemplate? Locale setting? Encoding of work texts?> I have identified and fixed > one problem of the code when using PageTemplate 2.2.3. > Still it does not work.Should I submit my patch? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/weft-qda-users/attachments/20061204/5d224b9c/attachment-0001.bin
Alex Fenton
2006-Dec-12 20:39 UTC
[Weft QDA users] export does not work (1.0.1 on GNU/Linux Mandriva)
Hi Bernhard>> I have identified and fixed >> one problem of the code when using PageTemplate 2.2.3. >> Still it does not work. >> > > Should I submit my patch? >Sorry for the delay in replying. It''s very kind of you to offer a patch - I think this is the first ever received for Weft. It would be very helpful to know where the bug arose, so please send it. However, I think it''s unlikely I''ll make another release of Weft QDA 1. This is mainly because I now don''t have a Linux dev environment for this, and don''t want to spend time building old wxruby 0.6.0 on a modern Linux. The good news is that I likely won''t have to do an intermediate release of Weft QDA - we can go straight to a version 2.0 that properly supports multilingual projects, and will work much better on Linux and also on Mac OS X. thanks alex
Bernhard Reiter
2006-Dec-12 21:55 UTC
[Weft QDA users] export does not work (1.0.1 on GNU/Linux Mandriva )
On Tuesday 12 December 2006 21:39, Alex Fenton wrote:> >> I have identified and fixed > >> one problem of the code when using PageTemplate 2.2.3. > >> Still it does not work. > > > > Should I submit my patch? > > It''s very kind of you to offer a patch > - I think this is the first ever received for Weft.Woohoo, first! ;) Actually my first email described the source code change, which was one line in /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/filters/templates.rb:43 tpl = PageTemplate::Parser.new(''source'' => CommentStrippingFileSource, ''include_paths'' => TEMPLATES_DIR, ''preprocessor'' => ExtendedPreprocessor ) changing the middle line to: ''include_path'' => TEMPLATES_DIR, As I got no reply, I wondered if the right procedure would have been to submit this analysis to a tracker in diff -u format or so to make it easier for you. It should be easy for you to just change this line, test and commit.> It would be very helpful to know where the bug arose, so please send it.As already written: I expect a change in newer versions of PageTemplate with this particular minor problem. Now I have seen [#4293] which is the larger part of the problem.> However, I think it''s unlikely I''ll make another release of Weft QDA 1. > This is mainly because I now don''t have a Linux dev environment for > this, and don''t want to spend time building old wxruby 0.6.0 on a modern > Linux.It is fairly easy to build that environment and currently this is the only released version of weft-qda. >:)> The good news is that I likely won''t have to do an intermediate release > of Weft QDA - we can go straight to a version 2.0 that properly supports > multilingual projects, and will work much better on Linux and also on > Mac OS X.Sounds good. Any time frame for the release? Bernhard -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/weft-qda-users/attachments/20061212/3b53250b/attachment.bin
Alex Fenton
2006-Dec-12 22:45 UTC
[Weft QDA users] export does not work (1.0.1 on GNU/Linux Mandriva )
Hi> Actually my first email described the source code change, which was one line > in > > /opt/weft-qda-20060mdk/weft_qda-1.0.1/lib/weft/filters/templates.rb:43 >Thanks again; I have now applied your fix.> As I got no reply, I wondered if the right procedure would have been to submit > this analysis to a tracker in diff -u format or so to make it easier for you. > It should be easy for you to just change this line, test and commit. >The subset of people who care about qualitative data analysis AND can fix bugs in ruby code is very small, so I hadn''t given it much thought. A description as you gave is just fine, or a diff -u patch on the mailing list.> As already written: I expect a change in newer versions of PageTemplate > with this particular minor problem.I think this is a change in PageTemplate which has broken this, as this definitely works on Windows, where the library versions are frozen. I am not sure I will use PageTemplate for Weft QDA 2. The idea was to make it possible for users to define their own output templates, but I''m not sure now that PageTemplate''s syntax is the best way to achieve this. I''d like to get some discussion going on this once there''s a software out there people can experiment with.>> This is mainly because I now don''t want to spend time building old wxruby 0.6.0 on a modern Linux. >> > > It is fairly easy to build that environment > and currently this is the only released version of weft-qda. >:) >Okay, but I probably still won''t, sorry. I try to strike a balance between developing and supporting the existing version. 80% + of users are on Windows, but almost all install problems arise on Linux. There are a variety of reasons for that, and it doesn''t necessarily reflect the inherent quality of those platforms - but it does influence me in how I spend my time.> Sounds good. Any time frame for the release? >I would hope to see an initial Weft QDA 2.0 preview release in perhaps one to two months. A stable 2.0 release might be some months beyond that. But it is also dependent on how quickly wxruby2 progresses and how much time I need to spend on that. cheers alex