Giter Club home page Giter Club logo

fmpvc's People

Contributors

martinboswell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fmpvc's Issues

Error "...undefined method `[]' for nil:NilClass (NoMethodError)" when parsing the CustomMenuCatalog

Error Text

When parsing a particular report of three solution files, one of the xml source files causes an error:

Parsing CustomMenuCatalog
/usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:268:in `block in define_content_procs': undefined method `[]' for nil:NilClass (NoMethodError)
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:147:in `call'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:147:in `block in parse_fmp_obj'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:187:in `block in each'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `upto'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in `each'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:124:in `parse_fmp_obj'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:39:in `initialize'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:54:in `new'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:54:in `block in process_reports'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:51:in `each'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:51:in `process_reports'
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/fmpvc-0.3.2/exe/fmpvc:46:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.1.0/bin/fmpvc:23:in `load'
    from /usr/local/Cellar/ruby/2.1.0/bin/fmpvc:23:in `<main>'

OS is MacOSX 10.8.5, Versions see error

How to reproduce the error

I could now drill this down:

The error is raised if inside the subtag

<CustomMenuCatalog>
    <CustomMenu>
    ...
    </CustomMenu>
</CustomMenuCatalog>

the inner tag

<BaseMenu />

is missing (regardless of the inner content).

Workaround

add an empty tag yourself before the closing tag.

I checked if a doubling of the tag hurts, and I had no issue using this trick. So you can simply run a search and replace like

s/</CustomMenu>/<BaseMenu /> </CustomMenu>

Solution

Currently no clue and time to dive into the code.

Thanks for all!

NoMethodError when parsing out xml

Hello, I'm getting the following error when I run this. First, I was having the issue with a large ddr_report involving multiple files, but then I tried using the FileMaker Assets starter template, and got the same error. Below is the error trace:

Parsing Summary
Processing Assets_fmp12.xml
Parsing ScriptCatalog
Parsing ScriptCatalog/Group[1]
Parsing ScriptCatalog/Group[2]
Parsing ScriptCatalog/Group[2]/Group
Parsing LayoutCatalog
Parsing LayoutCatalog/Group[1]
Parsing LayoutCatalog/Group[2]
Parsing LayoutCatalog/Group[3]
Parsing ValueListCatalog
Parsing BaseTableCatalog
Parsing CustomFunctionCatalog
Parsing CustomMenuSetCatalog
Parsing CustomMenuCatalog
Parsing AccountCatalog
Parsing PrivilegesCatalog
Parsing ExtendedPrivilegeCatalog
Parsing RelationshipGraph
Parsing AuthFileCatalog
Parsing ExternalDataSourcesCatalog
Parsing Options
Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:493:in block in define_content_procs': undefined method[]' for nil:NilClass (NoMethodError)
from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:147:in call' from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:147:inblock in parse_fmp_obj'
from /Users/username/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:187:in block in each' from /Users/username/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:inupto'
from /Users/username/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.6.2/lib/nokogiri/xml/node_set.rb:186:in each' from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:124:inparse_fmp_obj'
from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/fmpreport.rb:47:in initialize' from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:54:innew'
from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:54:in block in process_reports' from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:51:ineach'
from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/lib/fmpvc/ddr.rb:51:in process_reports' from /Users/username/.rvm/gems/ruby-2.1.2/gems/fmpvc-0.3.2/exe/fmpvc:46:in<top (required)>'
from /Users/username/.rvm/gems/ruby-2.1.2/bin/fmpvc:23:in load' from /Users/username/.rvm/gems/ruby-2.1.2/bin/fmpvc:23:in

'
from /Users/username/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in eval' from /Users/username/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in

Thanks,

Julio

Running on Ubuntu Server

Hi!

I found an issue trying to run this application on a Ubuntu Server.
The message was that it couldn't require the artfacts in /lib/fmpvc/ folder.
I solved it by renaming all files inside that directory to lowercase.
Still, I'm registering this ticket so if there's someone with the same problem, it could help.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.