relaton / relaton-data-bipm

Relaton bibliographic data for BIPM
2 stars 1 forks source link

BIPM Metrologia references cannot be fetched due to an undefined conversion error #24

Closed anermina closed 1 year ago

anermina commented 1 year ago

Several Metrologia references cannot be fetched due to an undefined conversion error.

Examples:

[relaton-bipm] ("BIPM Metrologia 53 3 G1") found Metrologia 53 3
[relaton] ERROR: BIPM Metrologia 53 3 G1 -- "\xE2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 7 1 15") found Metrologia 7 1 15
[relaton] ERROR: BIPM Metrologia 7 1 15 -- "\xCF" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 37 5 579") found Metrologia 37 5 579
[relaton] ERROR: BIPM Metrologia 37 5 579 -- "\xC2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 37 5 603") found Metrologia 37 5 603
[relaton] ERROR: BIPM Metrologia 37 5 603 -- "\xC2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 28 5 357") found Metrologia 28 5 357
[relaton] ERROR: BIPM Metrologia 28 5 357 -- "\xC2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 40 1 S35") found Metrologia 40 1
[relaton] ERROR: BIPM Metrologia 40 1 S35 -- "\xC2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 40 2 93") found Metrologia 40 2 93
[relaton] ERROR: BIPM Metrologia 40 2 93 -- "\xC2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 40 1 S154") found Metrologia 40 1
[relaton] ERROR: BIPM Metrologia 40 1 S154 -- "\xC2" from ASCII-8BIT to UTF-8
[relaton-bipm] ("BIPM Metrologia 40 4 195") found Metrologia 40 4 195
[relaton] ERROR: BIPM Metrologia 40 4 195 -- "\xE2" from ASCII-8BIT to UTF-8

Example of an output of the relaton fetch command:

...
C:/tools/ruby27/lib/ruby/gems/2.7.0/gems/htmlentities-4.3.4/lib/htmlentities/encoder.rb:25:in `encode': "\\xC2" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
ronaldtse commented 1 year ago

@anermina I was able to fetch all these references without issue. (however there is a bug). Perhaps this is a Windows vs macOS (I'm on a mac) issue?

$ bundle exec relaton fetch "BIPM Metrologia 53 3 G1"
[relaton-bipm] ("BIPM Metrologia 53 3 G1") fetching...
[relaton-bipm] ("BIPM Metrologia 53 3 G1") found Metrologia 53 3 
<bibdata type="article">
  <fetched>2022-09-20</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">Mise en pratique for the definition of the candela and associated derived units for photometric and radiometric quantities in the International System of Units ({SI})</title>
  <title type="main" format="text/plain" language="en" script="Latn">Mise en pratique for the definition of the candela and associated derived units for photometric and radiometric quantities in the International System of Units ({SI})</title>
  <uri type="src">https://iopscience.iop.org/article/10.1088/0026-1394/53/3/G1</uri>
  <uri type="doi">https://doi.org/10.1088/0026-1394/53/3/g1</uri>
  <docidentifier type="BIPM" primary="true">Metrologia 53 3 </docidentifier>
  <docidentifier type="DOI">10.1088/0026-1394/53/3/g1</docidentifier>
  <date type="published">
    <on>2016-05-01</on>
  </date>
  <contributor>
    <role type="publisher"/>
    <organization>
      <name>{IOP} Publishing</name>
    </organization>
  </contributor>
  <contributor>
    <role type="author"/>
    <person>
      <name>
        <surname language="en" script="Latn">Zwinkels</surname>
      </name>
    </person>
  </contributor>
  <language>en</language>
  <script>Latn</script>
  <abstract format="text/plain" language="en" script="Latn">The purpose of this mise en pratique, prepared by the Consultative Committee for Photometry and Radiometry (CCPR) of the International Committee for Weights and Measures (CIPM) and formally adopted by the CIPM, is to provide guidance on how the candela and related units used in photometry and radiometry can be realized in practice. The scope of the mise en pratique recognizes the fact that the two fields of photometry and radiometry and their units are closely related through the current definition of the SI base unit for the photometric quantity, luminous intensity: the candela. The previous version of the mise en pratique was applied only to the candela whereas this updated version covers the realization of the candela and other related units used for photometric and radiometric quantities. Recent advances in the generation and manipulation of individual photons show great promise of producing radiant fluxes with a well-established number of photons. Thus, this mise en pratique also includes information on the practical realization of units for photometric and radiometric quantities using photon-number-based techniques. In the following, for units used for photometric and radiometric quantities, the shorter term, photometric and radiometric units, is generally used. Section 1 describes the definition of the candela which introduces a close relationship between photometric and radiometric units. Sections 2 and 3 describe the practical realization of radiometric and photon-number-based units, respectively. Section 4.1 explains how, in general, photometric units are derived from radiometric units. Sections 4.2–4.5 deal with the particular geometric conditions for the specific photometric units. Section 5 deals very briefly with the topic of determination of measurement uncertainties in photometry.</abstract>
  <series>
    <title type="main" format="text/plain" language="en" script="Latn">Metrologia</title>
  </series>
  <extent>
    <locality type="volume">
      <referenceFrom>53</referenceFrom>
    </locality>
  </extent>
  <extent>
    <locality type="issue">
      <referenceFrom>3</referenceFrom>
    </locality>
  </extent>
  <extent>
    <locality type="page">
      <referenceFrom>G1</referenceFrom>
      <referenceTo>G1</referenceTo>
    </locality>
  </extent>
  <ext>
    <doctype>article</doctype>
  </ext>
</bibdata>
ronaldtse commented 1 year ago

@anermina perhaps try upgrade Relaton? i.e. bundle update

anermina commented 1 year ago

You're right @ronaldtse , @andrew2net recently solved this issue and I didn't update relaton-bipm. This isn't an issue anymore, so I'm closing this ticket.