question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Degree symbol is making reader break

See original GitHub issue

In the ~Parameter Information section of the attached here, the reader.py is throwing an error presumably when it encounters the degree symbol in the latitude and longitude fields.

LATI .        0° 0' 0  N                 :Latitude
LONG .        0° 0' 0  E                 :Longitude

The error message I’m getting has something to do with codecs. Is this something we can fix with the reader or it a problem that has to do with my Python installation?

[1045387215_top100ft.txt] (https://github.com/kinverarity1/lasio/files/1410966/1045387215_top100ft.txt)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kinverarity1commented, Oct 25, 2017

I can’t reproduce the error! Is it because I’m running windows and thus the default python encoding is correct?

The philosophy I’ve been guided by is to make it “just work” out of the box, so perhaps the default behaviour should be:

  1. By default use codecs.open(encoding=None) (default system python encoding, which is itself a bit of a mystery to me)
  2. If UnicodeDecodeError, catch and 2b. If cchardet (fallback chardet) installed, reload with autodetect_encoding=True 2c. If [c]chardet not installed, print warning to user recommending installation, but then try reloading with common encodings until we avoid the exception. 2c. If no success, re-raise the original UnicodeDecodeError

Does this sound like a happy medium?

0reactions
kinverarity1commented, Dec 19, 2017

Closing until confirmation

Read more comments on GitHub >

github_iconTop Results From Across the Web

Degree Symbol °
List of degree symbols where used in degrees of arc, degree of hour in geo coordinates, degrees of temperature. Make html degree sign,...
Read more >
Best way to encode Degree Celsius symbol into web page?
The degree sign belongs to the number, and not to the "C". You can regard the degree sign as a number symbol, just...
Read more >
Numbers | Grammar and Punctuation - Blogs @ MU
When mixed, break them up by alternating numerals and spelling. ... However, the placement of the numbers and degree symbol varies.
Read more >
How to type the degree° symbol on iPhone, iPad, and Mac
Open the app you're typing in and make sure the keyboard is up and ready. Access the numeric keyboard by tapping the 123...
Read more >
How to Insert Degree Symbol (°C) in Excel (7 Easy Ways)
What would happen to the number if it's not a numeric value? It would still be a number but with the degree symbol...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found