Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v07288 update object data-base bug #788

Open
andrescarmona opened this issue Oct 17, 2024 · 2 comments
Open

v07288 update object data-base bug #788

andrescarmona opened this issue Oct 17, 2024 · 2 comments

Comments

@andrescarmona
Copy link
Collaborator

Hello Luc, Neil,

I think I have the object datase bug too.
I did the cleaning of one object (directement sur mySQL, the v07288 version I have installed has not yet apero_remove.py).

Runned a science.ini for the object I deleted with the UPDATE_OBJ_DATABASE = True
and then got the error bellow.

Similar error happens when doing apero_astrometrics.

Suggestions to get around the error are welcomed!

Andres
:-)

10:30:18.312-|PROC| Updating object database (from google sheets)
10:30:28.763-!!|PROC| 10:30:28.598-
|DatabaseError|E[00-002-00047] Pandas.to_sql <class
10:30:28.763-!!|PROC| 'sqlalchemy.exc.IntegrityError'>: (mysql.connector.errors.IntegrityError) 1062
10:30:28.763-!!|PROC| (23000): Duplicate entry
10:30:28.763-!!|PROC| '1468be4997c1809dc621c9560017c815f38ea6355ee1470ae890850be383cb72' for key
10:30:28.763-!!|PROC| 'UHASH'
10:30:28.764-!!|PROC| [SQL: INSERT INTO astrom_full_v07288_db (OBJNAME, ORIGINAL_NAME, ALIASES,
10:30:28.764-!!|PROC| RA_DEG, RA_SOURCE, DEC_DEG, DEC_SOURCE, EPOCH, PMRA, PMRA_SOURCE,
10:30:28.764-!!|PROC| PMDE, PMDE_SOURCE, PLX, PLX_SOURCE, RV, RV_SOURCE, TEFF,
10:30:28.764-!!|PROC| TEFF_SOURCE, SP_TYPE, SP_SOURCE, NOTES, USED, DATE_ADDED, UHASH)
10:30:28.764-!!|PROC| VALUES (%(OBJNAME)s, %(ORIGINAL_NAME)s, %(ALIASES)s, %(RA_DEG)s, %(RA_SOURCE)s,
10:30:28.764-!!|PROC| %(DEC_DEG)s, %(DEC_SOURCE)s, %(EPOCH)s, %(PMRA)s, %(PMRA_SOURCE)s, %(PMDE)s,
10:30:28.764-!!|PROC| %(PMDE_SOURCE)s, %(PLX)s, %(PLX_SOURCE)s, %(RV)s, %(RV_SOURCE)s, %(TEFF)s,
10:30:28.764-!!|PROC| %(TEFF_SOURCE)s, %(SP_TYPE)s, %(SP_SOURCE)s, %(NOTES)s, %(USED)s,
10:30:28.764-!!|PROC| %(DATE_ADDED)s, %(UHASH)s)]
10:30:28.765-!!|PROC| [parameters: [{'OBJNAME': '10_LAC', 'ORIGINAL_NAME': '* 10 Lac', 'ALIASES': '*
10:30:28.765-!!|PROC| 10 Lac|** S 813A|** TRN 36|1RXS J223916.4+390252|2MASS J22391567+3903011|ADS
10:30:28.765-!!|PROC| 16148 A|AG+38 2350|ALS 14844|BD+38 4826|CCDM J22393+3903A|CEL 5 ... (1090
10:30:28.765-!!|PROC| characters truncated) ...
10:30:28.765-!!|PROC| 5|*10Lac|**S813A|**TRN36|10LAC|BD+384826|CEL5504|CSI+3848262|FK5852|HGAM1078|HR8622|JP113513|PMC90-93599|PPM88031|ROT3301|SAO72575|UBV19389|UBVM26533',

@njcuk9999
Copy link
Owner

Okay since there seems to be no way round this I've tried to isolate the code in v0.7.290 that fixes this.

Try a git pull in branch v0.7.288-stable-test and see if it works

you'll have to reset the object database with:

apero_database.py --reset --dbkind=astrom

Let me know if it works

@andrescarmona
Copy link
Collaborator Author

SWEEEEEET ! thank you Neil!

I confirm the fix it works!!

I launched the commands
$apero_database.py --reset --dbkind=astrom
$apero_astrometrics.py GL617B

and all cool!

B-)

I am processing and object now!

Andres

$apero_database.py --reset --dbkind=astrom
[...... ]
15:23:34.214- |DBMGR| ***************************************************************************
15:23:34.226-|DBMGR| Arguments used:
15:23:34.237-
|DBMGR|
15:23:34.238-|DBMGR| --DBKIND: astrom
15:23:34.238-
|DBMGR| --RESET: True
15:23:34.250- |DBMGR| ***************************************************************************
15:23:36.515- |DBMGR| Deleted astrometric database
15:23:36.620- |DBMGR| Created astrometric database
15:23:36.633-|DBMGR| Updating object database (from google sheets)
15:23:45.035-
|DBMGR| ***************************************************************************
15:23:45.050-**|DBMGR| Recipe apero_database has been successfully completed

$apero_astrometrics.py GL617B
15:26:57.584- |ASTROM| ***************************************************************************
15:26:57.596-|ASTROM| Arguments used:
15:26:57.607-
|ASTROM|
15:26:57.607-|ASTROM| --OBJECTS: GL617B
15:26:57.619- |ASTROM| ***************************************************************************
15:26:59.144- |ASTROM| Updating object database (from google sheets)
15:27:08.876- |ASTROM| Searching local object database for object names...
15:27:09.674- |ASTROM| - Object: "GL617B" found in database as "GJ617B"
15:27:09.688-
|ASTROM| All objects found in database
15:27:09.702-|ASTROM| ***************************************************************************
15:27:09.715-
|ASTROM| Recipe apero_astrometrics has been successfully completed
15:27:09.728-**|ASTROM| ***************************************************************************

15:23:45.063-**|DBMGR| ***************************************************************************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants