Git Product home page Git Product logo

Comments (1)

JamesParrott avatar JamesParrott commented on September 22, 2024

In the user provided example file, Read_Shp did not throw an error on field being missing, it issued a warning (below). Subsequently an error was raised, but due to #99, not to the missing field.


        if hasattr(options, 'field') and options.field not in fields:
            msg = 'field: %s not found in shape file fields: %s' 
            msg %= (options.field, fields)
            self.logger.warning(msg)
            warnings.warn(msg)

sDNA_GH.Read_Shp: INFO: Tools == [<ShapefileReader object at 0x000000000000014C>]
sDNA_GH.custom.tools.ShapefileReader: WARNING: field: BtEn not found in shape file fields: ['Shape_Leng', 'ID', 'LConn',---long list---, 'MCF2000', 'DivH2000']
...\UserObjects\sdna-gh\sDNA_GH\custom\tools.py:1: UserWarning: field: BtEn not found in shape file fields: ['Shape_Leng', 'ID', 'LConn', ---long list---, 'MCF2000', 'DivH2000']
#! /usr/bin/awk NR==3
sDNA_GH.custom.tools: ERROR:
The error:
{{ Unable to add polyline to document }}
occurred when adding shape number: 15830 from shapefile: C:...\Unreadable_shapefile\shp_file_test\shp_file_test....shp

Runtime error (Exception):
The error:
{{ Unable to add polyline to document }}
occurred when adding shape number: 15830 from shapefile: C:...\Unreadable_shapefile\shp_file_test\shp_file_test....shp

Traceback:
line 1971, in , "...\UserObjects\sdna-gh\sDNA_GH\custom\tools.py"
line 2012, in call, "...\UserObjects\sdna-gh\sDNA_GH\custom\tools.py"
line 1968, in gdm_of_new_geom_from_group, "...\UserObjects\sdna-gh\sDNA_GH\custom\tools.py"
line 130, in run_tools, "...\UserObjects\sdna-gh\sDNA_GH\custom\skel\tools\runner.py"
line 1237, in script, "...\UserObjects\sdna-gh\sDNA_GH\main.py"
line 375, in RunScript, "...\UserObjects\sdna-gh\sDNA_GH\custom\skel\basic\smart_comp.py"

from sdna_gh.

Related Issues (20)

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.