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.

Commas in the MPC CometEls.txt file causes errors.

See original GitHub issue

On the most recent versions of the CometEls.txt file, the code mpc.load_comets_dataframe() barfs, with an error of: ParserError: Error tokenizing data. C error: Expected 12 fields in line 522, saw 13

The problem seems to be that (for whatever reason) the CometsEls.txt file sometimes has a comma in the last column, e.g.: 0001P 1986 02 13.7202 0.602070 0.966313 111.8933 58.9646 162.2253 20220129 4.0 6.0 1P/Halley 98, 1083

If you edit the file and replace the commas with spaces, the problem goes away. So, the code in load_comets_dataframe() ought to either pre-sanitize the data or somehow treat commas in the content as text and not delimiters.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jurezakrajsekcommented, Jun 9, 2022

Not sure if this is related, but there was some errors on the MPC side, the file was not generated correctly and it contained some strange lines.

             **** 01  1       0.00      0.00        0         0         0                  9.0  4.0
    CJ95O010  1997 03 29.6811  0.891645  0.994970  130.4217  282.8643   89.2250  20220607  -2.0  4.0  C/1995 O1 (Hale-Bopp)                                    MPC106342

I have reported this to the MPC and they have resolved it.

1reaction
Bernmeistercommented, Jun 14, 2022

The fix is in! Many thanks again @brandon-rhodes

FWIW, I sudo pip3 uninstall skyfield, then sudo pip3 cache remove skyfield and installed (as per above) and then verified the code was actually present.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data Available from the Minor Planet Center
We are the official body that deals with astrometric observations and orbits of minor planets (asteroids) and comets.
Read more >
0001077: Can't load COMET.DAT files - MantisBT - AP-I
Go to 'Load MPC File' tab a select 'use local file'. Locate file and click on 'load file' button. No messages appear in...
Read more >
Installing Skyfield - Rhodes Mill
If trying to install Skyfield gives you errors about NumPy, there are several other ways to get NumPy installed: It is best to...
Read more >
Reference Guide - A companion to ACP Observatory Control ...
This web-enabled reference guide is a hyperlinked online document containing portions of the contents of the ACP Help file provided with ACP, ...
Read more >
MPO Connections Reference Guide - Bdw Publishing
SmartScript makes scripting even easier by remembering previously entered commands. For example, the. GoToAsteroid command doesn't require ...
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