Svg error parsing attribute name

SVG Parsing error #3755 Comments Expected behavior No error messages when rendering. Actual behavior attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute […]

Содержание

  1. SVG Parsing error #3755
  2. Comments
  3. Expected behavior
  4. Actual behavior
  5. What to do?
  6. Parse error on case-sensitive attributes in SVG #18
  7. Comments
  8. Svg error parsing attribute name
  9. Invariant Violation: Invalid tag for SVG #881
  10. Comments

SVG Parsing error #3755

Expected behavior

No error messages when rendering.

Actual behavior

attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error:

attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error:

attribute is not supported» Mapnik LOG> 2019-04-19 14:26:05: SVG PARSING ERROR:»SVG support error: attribute is not supported»»>

What to do?

In this particular case, symbols/amenity/bureau_de_change.svg is the problem. But there are more icons that have non-supported elements.

Apparently this does not damage the rendering. Should it be fixed anyway?

The text was updated successfully, but these errors were encountered:

Источник

Parse error on case-sensitive attributes in SVG #18

While trying this tool on a bunch of codebases, I ran into issues with SVG code embedded in HTML. For example,

With this code, Jinjalint will report a parse error on the viewBox attribute, because of the capital «B»:

I assume this is because Jinjalint treats this as if it was HTML, and wants attributes to be lowercase. SVG being based on XML, it is case-sensitive, and it would be incorrect to replace this with viewbox .

I think potential solutions for this would either be to ignore attribute casing inside svg tags (in the tag’s own attribute, and its children), or have a whitelist of attributes that should be treated as case-sensitive.

The text was updated successfully, but these errors were encountered:

It looks like a simple fix for this would be to allow uppercase letters in all attributes, by changing:

Lines 330 to 335 in 01e0a4d

def make_attribute_parser ( jinja ):
attribute_value = make_attribute_value_parser ( jinja )
return (
locate (
P . seq (
interpolated ( tag_name ),

to use the following attr_name instead of tag_name

Of course this isn’t 100% appropriate since only SVG attributes can be camelCase, and this regex isn’t strictly restricting «camelCase».

I could also think of two alternatives that might be more correct, but I’m not sure how much effort they would be to implement:

  • Use a whitelist of (SVG) attributes that are allowed to contain uppercase letters – this should be relatively easy to implement but the whitelist might be annoying to maintain (although SVG doesn’t change that much over time, https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute, and I guess it doesn’t hurt to add SVG 2.0 attributes already even if support is patchy)
  • Change the parsing rules depending on whether we are inside an svg tag or not. This would be more correct but also seems like much more work

Additionally I’m not sure how this attributes parsing works with namespaced attributes (e.g. xml:lang ), but this could also be similarly handled.

I’m leaning towards the attributes whitelist since it will be easy to get set up. If this was set up for HTML attributes as well this could also potentially catch many more issues with mis-typed attributes.

I landed here because of camel case html attributes. It took quite some time to understand the problem, since the browsers accept camel case attributes, even if they are wrong probably.

Therefore I suggest additionally that the error message states the error more clearly. (Like: only lower case characters in attribute name)

I’ve ended up fixing this in my fork in the way I describe above, along with other SVG-related parsing issues. Since this really is just parsing I think the parser should just be more lenient – browsers have no problem with uppercase tags. Enforcing that tags are lowercase / only use valid elements should be done by a linting rule, after parsing.

I’ve ended up fixing this in my fork in the way I describe above, along with other SVG-related parsing issues.

Could you do a pr here? Or is fork not a git fork?

Since this really is just parsing I think the parser should just be more lenient – browsers have no problem with uppercase tags. Enforcing that tags are lowercase / only use valid elements should be done by a linting rule, after parsing.

Yep, can make a PR, although I’m not too hopeful about it getting merged. Here is the changed that fixed this: thibaudcolas/curlylint@fdd9554

It’s not what this issue is about but I subsequently had to do a much bigger change for the parser to not fail on self-closing SVG elements, thibaudcolas/curlylint@7bd5160.

Источник

Svg error parsing attribute name

I’m trying to convert an .epub file to .mobi and get this error:

ERROR: Conversion Error: Failed: Convert book 1 of 1 (Unseen Academicals)

Convert book 1 of 1 (Unseen Academicals)
Resolved conversion options
<‘asciiize’: False,
‘author_sort’: None,
‘authors’: None,
‘base_font_size’: 0.0,
‘book_producer’: None,
‘chapter’: u»//*[((name()=’h1′ or name()=’h2′) and re:test(., ‘chapter|book|section|part\s+’, ‘i’)) or @class = ‘chapter’]»,
‘chapter_mark’: u’pagebreak’,
‘comments’: None,
‘cover’: ‘c:\docume

1\temp\calibre_0.6 .31_dl2vew.jpeg’,
‘debug_pipeline’: None,
‘disable_font_rescaling’: False,
‘dont_compress’: False,
‘dont_justify’: False,
‘extra_css’: None,
‘font_size_mapping’: None,
‘footer_regex’: u'(?i)(? )((\s* (( )*
\s*)?\d+
\s*.*?\s*)|(\s* (( )*
\s*)?.*?
\s*\d+))(?=
)’ ,
‘header_regex’: u'(?i)(? )((\s* (( )*
\s*)?\d+
\s*.*?\s*)|(\s* (( )*
\s*)?.*?
\s*\d+))(?=
)’ ,
‘input_encoding’: None,
‘input_profile’: ,
‘insert_blank_line’: False,
‘insert_metadata’: False,
‘isbn’: None,
‘language’: None,
‘level1_toc’: None,
‘level2_toc’: None,
‘level3_toc’: None,
‘line_height’: 0.0,
‘linearize_tables’: False,
‘margin_bottom’: 5.0,
‘margin_left’: 5.0,
‘margin_right’: 5.0,
‘margin_top’: 5.0,
‘max_toc_links’: 50,
‘no_chapters_in_toc’: False,
‘no_inline_navbars’: True,
‘no_inline_toc’: True,
‘output_profile’: ,
‘page_breaks_before’: u’/’,
‘prefer_author_sort’: True,
‘prefer_metadata_cover’: False,
‘preprocess_html’: False,
‘pretty_print’: False,
‘publisher’: None,
‘rating’: None,
‘read_metadata_from_opf’: ‘c:\docume

1\temp\calibre_0.6 .31_ngrb6x.opf’,
‘remove_first_image’: True,
‘remove_footer’: False,
‘remove_header’: False,
‘remove_paragraph_spacing’: False,
‘remove_paragraph_spacing_indent_size’: 1.5,
‘rescale_images’: False,
‘series’: None,
‘series_index’: None,
‘tags’: None,
‘title’: None,
‘title_sort’: None,
‘toc_filter’: None,
‘toc_threshold’: 6,
‘toc_title’: None,
‘use_auto_toc’: False,
‘verbose’: 2>
InputFormatPlugin: EPUB Input running
on C:Documents and SettingsCalvinCalibre LibraryPratchett_ TerryUnseen Academicals (5)Unseen Academicals — Pratchett_ Terry.epub
Found HTML cover OEBPS/unseenacademicals_cov.html
Parsing all content.
Parsing OEBPS/footnote13.html .
Parsing OEBPS/footnote4.html .
Parsing OEBPS/footnote6.html .
Parsing OEBPS/footnote8.html .
Parsing OEBPS/footnote15.html .
Parsing OEBPS/footnote27.html .
Parsing OEBPS/unseenacademicals_con.html .
Parsing OEBPS/footnote11.html .
Parsing OEBPS/unseenacademicals.css .
Property: Invalid value for «CSS Level 2.1» property: sup [1221:2: vertical-align]
Property: Invalid value for «CSS Level 2.1» property: sup [1985:2: vertical-align]
Parsing OEBPS/unseenacademicals_cov.html .
Parsing OEBPS/unseenacademicals_adc01.html .
Parsing OEBPS/unseenacademicals_tp01.html .
Parsing OEBPS/unseenacademicals_ded01.html .
Parsing OEBPS/unseenacademicals_ch02.html .
Initial parse failed:
Traceback (most recent call last):
File «site-packagescalibreebooksoebbase.py», line 803, in first_pass
File «lxml.etree.pyx», line 2538, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48266)
File «parser.pxi», line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71653)
File «parser.pxi», line 1408, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70449)
File «parser.pxi», line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67144)
File «parser.pxi», line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63820)
File «parser.pxi», line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64741)
File «parser.pxi», line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64084)
XMLSyntaxError: Unescaped ‘

Источник

Invariant Violation: Invalid tag for SVG #881

I was using svg-react-loader to import SVG in component in client side app.

I am trying to move to server-side and working around to integrate Razzle, resolving errors.

Somehow svgs are not working. When I open the url, this what getting displayed:

build/static/media/ folder has two variant of each images, one has svg code other has react code to render svg.

The image in above pic has react code:

The text was updated successfully, but these errors were encountered:

and using it like

That is why giving error. But if Use it like The error is gone and page is rendering. But image is still not working.

When I open localhost:3001/image path url, it displays:

And when I open that static/media/logotype.svg , the content is javascript & React.

How should I handle this?

I have the same problem, using @svgr

Instead of using svg-react-loader , you may want to instead use inline-react-svg + svgo . I haven’t published this plugin, but here’s what I’m using internally since the razzle-dev-utils are easy to work with:

The combination of the two above items will let you do import MySvg from ‘./path/to/my.svg’; and use it as a react component via

(edit: I updated the plugin configuration to a single file and cleaned it up so someone else can leverage this code easily)

@jakobo Thanks for sharing. I’m getting Cannot read property ‘push’ of undefined , «Using .babelrc defined in your app root». «babelLoader» does not have a «plugins» attribute. How does your «.babelrc» look like?

I’ll update the module above to be more safe. Testing babelLoader.plugins before push should be sufficient.

Thanks, so there is no need to use «plugins»: [«inline-react-svg»] in «.babelrc»? If I add «.plugin» manually:

I get error:
`Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

Are plugins not part of babelLoader.use[0].options ?

If you’ve got a custom .babelrc this should in theory work (though I think I went the razzle.config.js route because I was supporting babel 7 at the time)

I also found the issue with the plugin above from extraction and will fix it.

Edit: see #881 (comment) for a working plugin in your razzle.config.js . It’s based on the mdx pattern from the Razzle examples.

Thanks, yes — I’m also in the babel 7 boat. With custom .babelrc I run into this problem: (#912). And I don’t want to use razzle alpha in production.

@kkarkos I’d go with the plugin I revised above then: (#881 (comment))

I just brought up my dev server with that plugin and verified it worked, but let me know if you get any errors with it.

@jakobo Cheers! This brings up the following:

ERROR in ./src/client/index.js Module build failed (from ./node_modules/razzle/node_modules/babel-loader/lib/index.js): Error: Requires Babel «^7.0.0-0», but was loaded with «6.25.0». If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn’t mention «@babel/core» or «babel-core» to see what is calling Babel.

Might be related to #912 but I removed «@babel/core»: «^7.2.2», from package.json. So I’m using razzles «6.25.0». What version are you using this with?

Ok — found the issue. /babel-plugin-inline-react-svg > v1 uses babel 7. That’s where the error came from. Using «v0.5.4» and all good via babelrc. Cheers!

@jakobo have you wrapped this up into an npm module yet? If not, would you have any issues with me doing so if I gave you original author credit?

EDIT, this isn’t working for me, I spoke to soon. Still getting this error on the server 🙁

Источник

Screenshot

Describe the bug
ERROR: postcss-svgo: Error in parsing SVG: Invalid attribute name | Line: 0 | Column: 67 | Char: 3

To Reproduce
In appears on production builds for react-app. It’s part of the package-lock.json «postcss-svgo»: «^4.0.2“ and listet under requires of «cssnano-preset-default“.

package.json

{
  "name": "kinzigstick",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "bootstrap": "^4.5.0",
    "dom-to-image": "^2.6.0",
    "jquery": "^3.5.1",
    "node-sass": "^4.14.1",
    "react": "^16.13.1",
    "react-animation": "^1.2.2",
    "react-app-env": "^1.2.3",
    "react-bootstrap": "^1.0.1",
    "react-cookie-consent": "^2.5.0",
    "react-dom": "^16.13.1",
    "react-dropzone": "^10.2.2",
    "react-icons-kit": "^1.3.1",
    "react-router-dom": "^5.2.0",
    "react-scripts": "^3.4.1",
    "react-sliding-pane": "^3.1.0",
    "react-textfit": "^1.1.0"
  },
  "scripts": {
    "start": "npm run localhost",
    "localhost": "node -r dotenv/config ./node_modules/.bin/react-scripts start dotenv_config_path=config/localhost.env",

    "build:development": "npm run development & npm run map:development && rm -rf build_development && mv build build_development",
    "development": "node -r dotenv/config ./node_modules/.bin/react-scripts build dotenv_config_path=config/development.env",
    "map:development": "babel-node -r ./node_modules/dotenv/config ./src/_sitemap_generator.js dotenv_config_path=config/development.env",
    
    "build:staging": "npm run staging & npm run map:staging && rm -rf build_staging && mv build build_staging",
    "staging": "node -r dotenv/config ./node_modules/.bin/react-scripts build dotenv_config_path=config/staging.env",
    "map:staging": "babel-node -r ./node_modules/dotenv/config ./src/_sitemap_generator.js dotenv_config_path=config/staging.env",

    "build:production": "npm run production & npm run map:production && rm -rf build_production && mv build build_production",
    "production": "node -r dotenv/config ./node_modules/.bin/react-scripts build dotenv_config_path=config/production.env",
    "map:production": "babel-node -r ./node_modules/dotenv/config ./src/_sitemap_generator.js dotenv_config_path=config/production.env",

    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@babel/core": "^7.10.3",
    "@babel/node": "^7.10.3",
    "@babel/preset-env": "^7.10.3",
    "react-router-sitemap": "^1.2.0"
  }
}

gulpfile.js

const
  gulp          = require('gulp'),
  gulpsass      = require('gulp-sass'),
  browsersync   = require("browser-sync"),
  babel         = require('gulp-babel'),
  phpConnect    = require('gulp-connect-php'),
  concat        = require('gulp-concat'),
  concatCSS     = require('gulp-concat-css'),
  uglify        = require('gulp-uglifyjs'),
  cssnano       = require('gulp-cssnano'),
  rename        = require('gulp-rename'),
  del           = require('del'),
  imagemin      = require('gulp-imagemin'),
  pngquant      = require('imagemin-pngquant'),
  cache         = require('gulp-cache'),
  autoprefixer  = require('gulp-autoprefixer'),
  htmlmin       = require('gulp-htmlmin'),

function gulpSass() {
  return gulp
    .src('assets/sass/**/*.sass')
    .pipe(gulpsass({ outputStyle: "expanded" }))
    .pipe(autoprefixer(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], {cascade: true}))
    .pipe(gulp.dest('assets/css'))
    .pipe(browsersync.stream());
}

function libsJs() {
  return gulp.src([
    'assets/libs/jquery-3.3.1.min.js',
    'assets/libs/bootstrap-4.3.1-dist/js/bootstrap.js',
    'assets/libs/validator.min.js'
  ])
    .pipe(concat('libs.min.js'))
    .pipe(uglify({
      toplevel: true
    }))
    .pipe(gulp.dest('assets/js'))
}

function scripts(){
  return gulp
    .src(['assets/js/main.js', 'assets/js/index.js'])
    .pipe(babel({
      presets: ['@babel/env']
    }))
    .pipe(gulp.dest('assets/scripts'))
}

function libsCss() {
  return gulp.src([
    'assets/libs/bootstrap-4.3.1-dist/css/bootstrap.css',
    'assets/css/animate.css'
  ])
    .pipe(concatCSS('libs.css'))
    .pipe(gulp.dest('assets/css'))
    .pipe(cssnano())
    .pipe(rename({suffix: '.min'}))
    .pipe(gulp.dest('assets/css'))
}

function browserSync(done) {
  phpConnect.server({
    port: 8000,
    notify: false,
    keepalive: true,
    base: "./"
  }, function (){
    browsersync({
      proxy: '127.0.0.1:8000/'
    });
  });
  done();
}

function clean() {
  return del(["dist"]);
}
function cleanES() {
  return del(["assets/script"]);
}
function clear() {
  return cache.clearAll();
}

function images() {
  return gulp
    .src("assets/images/**/*")
    .pipe((cache(
      imagemin([
        imagemin.gifsicle({ interlaced: true }),
        imagemin.jpegtran({ progressive: true }),
        imagemin.optipng({ optimizationLevel: 5 }),
        imagemin.svgo({
          plugins: [
            {
              removeViewBox: false,
              collapseGroups: true,
              use: [pngquant()]
            }
          ]
        })
      ])))

    )
    .pipe(gulp.dest('dist/assets/images'));
}

function watchFiles(done) {
  gulp.watch("./**/*.php", reload);
  gulp.watch('assets/sass/**/*.sass', gulp.parallel(gulpSass));
  gulp.watch('assets/js/**/*.js', reload);
  gulp.watch('*.html', reload);
  done();
}

function buildFiles(done) {
  gulp.src([
    'assets/css/main.css',
    'assets/css/libs.min.css'
  ])
    .pipe(cssnano())
    .pipe(gulp.dest('dist/assets/css'));

  gulp.src(
    'assets/js/libs.min.js')
    .pipe(gulp.dest('dist/assets/js'));

  gulp.src(['assets/scripts/main.js'])
    .pipe(uglify())
    .pipe(gulp.dest('dist/assets/scripts'));

  gulp.src(['assets/scripts/config-contact.js'])
    .pipe(uglify({
      toplevel: true
    }))
    .pipe(gulp.dest('dist/assets/scripts'));

  gulp.src('static**!/!*')
    .pipe(gulp.dest('dist'));

  gulp.src('php**!/!*')
    .pipe(gulp.dest('dist'));

  gulp.src('*.html')
    .pipe(htmlmin({collapseWhitespace: true}))
    .pipe(gulp.dest('dist'));

  gulp.src('*.txt')
    .pipe(gulp.dest('dist'));

  gulp.src('*.xml')
    .pipe(gulp.dest('dist'));

  gulp.src('.htaccess')
    .pipe(gulp.dest('dist'));
  done();
}
const watch = gulp.series(watchFiles, gulp.parallel(cleanES, browserSync, scripts, libsJs, libsCss));
const build = gulp.series(clean, gulp.parallel(buildFiles, images, libsJs));

exports.clean = clean;
exports.clean = cleanES;
exports.clear = clear;
exports.watch = watch;
exports.build = build;
exports.default = watch;

function reload(done) {
  browsersync.reload();
  done();
}

Вылетает ошибка Error in plugin «gulp-cssnano»
Message:
postcss-svgo: Error in parsing SVG: Unquoted attribute value

И еще проблема, у меня sass не стримит а релоадит

ERROR: Conversion Error: <b>Failed</b>: Convert book 1 of 1 (Unseen Academicals)

Convert book 1 of 1 (Unseen Academicals)
Resolved conversion options
{‘asciiize’: False,
‘author_sort’: None,
‘authors’: None,
‘base_font_size’: 0.0,
‘book_producer’: None,
‘chapter’: u»//*[((name()=’h1′ or name()=’h2′) and re:test(., ‘chapter|book|section|part\s+’, ‘i’)) or @class = ‘chapter’]»,
‘chapter_mark’: u’pagebreak’,
‘comments’: None,
‘cover’: ‘c:\docume~1\calvin\locals~1\temp\calibre_0.6 .31_dl2vew.jpeg’,
‘debug_pipeline’: None,
‘disable_font_rescaling’: False,
‘dont_compress’: False,
‘dont_justify’: False,
‘extra_css’: None,
‘font_size_mapping’: None,
‘footer_regex’: u'(?i)(?<=<hr>)((\s*<a name=\d+></a>((<img.+?>)*<br>\s*)?\d+<br>\s*.*?\s*)|(\s* <a name=\d+></a>((<img.+?>)*<br>\s*)?.*?<br>\s*\d+))(?=<br>)’ ,
‘header_regex’: u'(?i)(?<=<hr>)((\s*<a name=\d+></a>((<img.+?>)*<br>\s*)?\d+<br>\s*.*?\s*)|(\s* <a name=\d+></a>((<img.+?>)*<br>\s*)?.*?<br>\s*\d+))(?=<br>)’ ,
‘input_encoding’: None,
‘input_profile’: <calibre.customize.profiles.InputProfile object at 0x02852D30>,
‘insert_blank_line’: False,
‘insert_metadata’: False,
‘isbn’: None,
‘language’: None,
‘level1_toc’: None,
‘level2_toc’: None,
‘level3_toc’: None,
‘line_height’: 0.0,
‘linearize_tables’: False,
‘margin_bottom’: 5.0,
‘margin_left’: 5.0,
‘margin_right’: 5.0,
‘margin_top’: 5.0,
‘max_toc_links’: 50,
‘no_chapters_in_toc’: False,
‘no_inline_navbars’: True,
‘no_inline_toc’: True,
‘output_profile’: <calibre.customize.profiles.KindleOutput object at 0x0285A050>,
‘page_breaks_before’: u’/’,
‘prefer_author_sort’: True,
‘prefer_metadata_cover’: False,
‘preprocess_html’: False,
‘pretty_print’: False,
‘publisher’: None,
‘rating’: None,
‘read_metadata_from_opf’: ‘c:\docume~1\calvin\locals~1\temp\calibre_0.6 .31_ngrb6x.opf’,
‘remove_first_image’: True,
‘remove_footer’: False,
‘remove_header’: False,
‘remove_paragraph_spacing’: False,
‘remove_paragraph_spacing_indent_size’: 1.5,
‘rescale_images’: False,
‘series’: None,
‘series_index’: None,
‘tags’: None,
‘title’: None,
‘title_sort’: None,
‘toc_filter’: None,
‘toc_threshold’: 6,
‘toc_title’: None,
‘use_auto_toc’: False,
‘verbose’: 2}
InputFormatPlugin: EPUB Input running
on C:Documents and SettingsCalvinCalibre LibraryPratchett_ TerryUnseen Academicals (5)Unseen Academicals — Pratchett_ Terry.epub
Found HTML cover OEBPS/unseenacademicals_cov.html
Parsing all content…
Parsing OEBPS/footnote13.html …
Parsing OEBPS/footnote4.html …
Parsing OEBPS/footnote6.html …
Parsing OEBPS/footnote8.html …
Parsing OEBPS/footnote15.html …
Parsing OEBPS/footnote27.html …
Parsing OEBPS/unseenacademicals_con.html …
Parsing OEBPS/footnote11.html …
Parsing OEBPS/unseenacademicals.css …
Property: Invalid value for «CSS Level 2.1» property: sup [1221:2: vertical-align]
Property: Invalid value for «CSS Level 2.1» property: sup [1985:2: vertical-align]
Parsing OEBPS/unseenacademicals_cov.html …
Parsing OEBPS/unseenacademicals_adc01.html …
Parsing OEBPS/unseenacademicals_tp01.html …
Parsing OEBPS/unseenacademicals_ded01.html …
Parsing OEBPS/unseenacademicals_ch02.html …
Initial parse failed:
Traceback (most recent call last):
File «site-packagescalibreebooksoebbase.py», line 803, in first_pass
File «lxml.etree.pyx», line 2538, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48266)
File «parser.pxi», line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71653)
File «parser.pxi», line 1408, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70449)
File «parser.pxi», line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67144)
File «parser.pxi», line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63820)
File «parser.pxi», line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64741)
File «parser.pxi», line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64084)
XMLSyntaxError: Unescaped ‘<‘ not allowed in attributes values, line 1196, column 41

Parsing file ‘OEBPS/unseenacademicals_ch02.html’ as HTML
Forcing OEBPS/unseenacademicals_ch02.html into XHTML namespace
Stripping comments and meta tags from OEBPS/unseenacademicals_ch02.html
Failed to parse content in OEBPS/unseenacademicals_ch02.html
Traceback (most recent call last):
File «site-packagescalibreebooksoebreader.py», line 159, in _manifest_prune_invalid
File «site-packagescalibreebooksoebbase.py», line 1014, in fget
File «site-packagescalibreebooksoebbase.py», line 871, in _parse_xhtml
File «lxml.etree.pyx», line 2538, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48266)
File «parser.pxi», line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71653)
File «parser.pxi», line 1408, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70449)
File «parser.pxi», line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67144)
File «parser.pxi», line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63820)
File «parser.pxi», line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64741)
File «parser.pxi», line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64084)
XMLSyntaxError: error parsing attribute name, line 1253, column 29

Parsing OEBPS/footnote12.html …
Parsing OEBPS/unseenacademicals_ch03.html …
Parsing OEBPS/unseenacademicals_ch04.html …
Parsing OEBPS/unseenacademicals_ata01.html …
Parsing OEBPS/footnote14.html …
Parsing OEBPS/unseenacademicals_cre01.html …
Parsing OEBPS/unseenacademicals_cop01.html …
Parsing OEBPS/unseenacademicals_atp01.html …
Parsing OEBPS/footnote17.html …
Parsing OEBPS/footnote19.html …
Parsing OEBPS/footnote20.html …
Parsing OEBPS/footnote22.html …
Parsing OEBPS/footnote24.html …
Parsing OEBPS/footnote26.html …
Parsing OEBPS/footnote3.html …
Parsing OEBPS/footnote5.html …
Parsing OEBPS/footnote7.html …
Parsing OEBPS/footnote9.html …
Parsing OEBPS/footnote10.html …
Parsing OEBPS/unseenacademicals_ch01.html …
Parsing OEBPS/footnote1.html …
Parsing OEBPS/footnote16.html …
Parsing OEBPS/footnote18.html …
Parsing OEBPS/footnote2.html …
Parsing OEBPS/footnote21.html …
Parsing OEBPS/footnote23.html …
Parsing OEBPS/footnote25.html …
Referenced file ‘OEBPS/unseenacademicals_ch02.html’ not in manifest
Parsing OEBPS/unseenacademicals_ch02.html …
Initial parse failed:
Traceback (most recent call last):
File «site-packagescalibreebooksoebbase.py», line 803, in first_pass
File «lxml.etree.pyx», line 2538, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48266)
File «parser.pxi», line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71653)
File «parser.pxi», line 1408, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70449)
File «parser.pxi», line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67144)
File «parser.pxi», line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63820)
File «parser.pxi», line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64741)
File «parser.pxi», line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64084)
XMLSyntaxError: Unescaped ‘<‘ not allowed in attributes values, line 1196, column 41

Parsing file ‘OEBPS/unseenacademicals_ch02.html’ as HTML
Forcing OEBPS/unseenacademicals_ch02.html into XHTML namespace
Stripping comments and meta tags from OEBPS/unseenacademicals_ch02.html
Python function terminated unexpectedly
error parsing attribute name, line 1253, column 29 (Error Code: 1)
Traceback (most recent call last):
File «site.py», line 103, in main
File «site.py», line 85, in run_entry_point
File «site-packagescalibreutilsipcworker.py», line 90, in main
File «site-packagescalibregui2convertgui_conversion.py», line 21, in gui_convert
File «site-packagescalibreebooksconversionplumber.py», line 745, in run
File «site-packagescalibreebooksconversionplumber.py», line 866, in create_oebbook
File «site-packagescalibreebooksoebreader.py», line 72, in __call__
File «site-packagescalibreebooksoebreader.py», line 588, in _all_from_opf
File «site-packagescalibreebooksoebreader.py», line 243, in _manifest_from_opf
File «site-packagescalibreebooksoebreader.py», line 176, in _manifest_add_missing
File «site-packagescalibreebooksoebbase.py», line 1014, in fget
File «site-packagescalibreebooksoebbase.py», line 871, in _parse_xhtml
File «lxml.etree.pyx», line 2538, in lxml.etree.fromstring (src/lxml/lxml.etree.c:48266)
File «parser.pxi», line 1536, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:71653)
File «parser.pxi», line 1408, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:70449)
File «parser.pxi», line 898, in lxml.etree._BaseParser._parseUnicodeDoc (src/lxml/lxml.etree.c:67144)
File «parser.pxi», line 539, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:63820)
File «parser.pxi», line 625, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:64741)
File «parser.pxi», line 565, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:64084)
lxml.etree.XMLSyntaxError: error parsing attribute name, line 1253, column 29

Upgraded to 20.04 today and, somehow, Document Viewer is not able to open .svg files. It keeps giving this error. Previously, when I was using 18.04, everything was working fine. No such errors I encountered.

XML parse error: error code=201 (3) in (null):606:15: Namespace prefix xlink for href on image is not defined

EDIT

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="200" height="200">
  <image id="image0" width="200" height="200" x="0" y="0"
    xlink:href="data:image/png;base64

BeastOfCaerbannog's user avatar

asked Aug 7, 2020 at 6:27

C.S.'s user avatar

3

Your document viewer complains about the svg file having an xlink notation somewhere without being declared. As such, your svg file is not a valid xml and the document viewer complains correctly. Maybe in the newer version it is more strict about it.

To fix your file open it with an editor and make sure the xlink declaration is included in the <svg> tag in the very beginning of your file, it should look something like this:

<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">

Update: For your file, change this line:

<svg width="200" height="200">

to this:

<svg width="200" height="200"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">

answered Aug 7, 2020 at 7:56

pLumo's user avatar

pLumopLumo

25.4k2 gold badges56 silver badges85 bronze badges

1

See: <svg> — SVG: Scalable Vector Graphics | MDN

The svg element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents, but it can also be used to embed a SVG fragment inside an SVG or HTML document.

Note: The xmlns attribute is only required on the outermost svg element of SVG documents. It is unnecessary for inner svg elements or inside HTML documents.


It is enough in most cases the svg tag to have the following attributes: xmlns and viewBox; optionally width and height:

<svg xmlns="http://www.w3.org/2000/svg"
     viewBox="0 0 16 16" width="50" height="50">
  <g>
    <path d=". . ."></path>
  </g>
</svg>

Zanna's user avatar

Zanna

68.2k55 gold badges210 silver badges320 bronze badges

answered Aug 7, 2020 at 9:15

Понравилась статья? Поделить с друзьями:
  • Syntax error at or near for postgresql
  • Svchost exe что это ошибка
  • Syntax error at or near at character
  • Syntax error at or near array
  • Svchost exe системное предупреждение unknown hard error