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

0.7.290 issue with apero_astrometrics.py adding a new target #785

Open
larnoldgithub opened this issue Oct 4, 2024 · 9 comments
Open

0.7.290 issue with apero_astrometrics.py adding a new target #785

larnoldgithub opened this issue Oct 4, 2024 · 9 comments

Comments

@larnoldgithub
Copy link
Collaborator

larnoldgithub commented Oct 4, 2024

Fresh install of the 290
I ran apero_precheck
no erorrs but got a list a targets not in the objdb as usual
entered one for cloutier Kepler-1646 but got the error bellow

17:34:21.216-|ASTROM| ***************************************************************************
17:34:21.236-
|ASTROM| Updating pending-list online database
17:34:21.256-|ASTROM| ***************************************************************************
17:34:21.272-!!|ASTROM| E[01-010-00001]: Unhandled error has occurred: Error <class 'AttributeError'>
17:34:21.272-!!|ASTROM|
17:34:21.272-!!|ASTROM| Traceback (most recent call last):
17:34:21.273-!!|ASTROM| File "/apero/apero-drs-v0.7.290/apero/core/utils/drs_startup.py", line 433, in run
17:34:21.273-!!|ASTROM| llmain = func(recipe, params)
17:34:21.273-!!|ASTROM| File "/apero/apero-drs-v0.7.290/tools/bin/apero_astrometrics.py", line 199, in main
17:34:21.273-!!|ASTROM| drs_astrometrics.add_obj_to_sheet(params, add_objs)
17:34:21.273-!!|ASTROM| File "/apero/apero-drs-v0.7.290/apero/tools/module/database/drs_astrometrics.py", line 1620, in add_obj_to_sheet
17:34:21.274-!!|ASTROM| google_sheet = gspd.spread.Spread(sheet_id)
17:34:21.274-!!|ASTROM| File "/conda/miniconda3/envs/apero-env-v0.7.290/lib/python3.9/site-packages/gspread_pandas/spread.py", line 126, in init
17:34:21.274-!!|ASTROM| self.client = Client(user, config, scope, creds)
17:34:21.274-!!|ASTROM| File "/conda/miniconda3/envs/apero-env-v0.7.290/lib/python3.9/site-packages/gspread_pandas/client.py", line 96, in init
17:34:21.274-!!|ASTROM| self._root = self._drive_request(file_id="root", params={"fields": "name,id"})
17:34:21.274-!!|ASTROM| File "/conda/miniconda3/envs/apero-env-v0.7.290/lib/python3.9/site-packages/gspread_pandas/client.py", line 197, in _drive_request
17:34:21.275-!!|ASTROM| res = self.request(method, url, params=params, json=data)
17:34:21.275-!!|ASTROM| File "/conda/miniconda3/envs/apero-env-v0.7.290/lib/python3.9/site-packages/gspread_pandas/util.py", line 292, in request
17:34:21.275-!!|ASTROM| return ClientV4.request(client, *args, kwargs)
17:34:21.275-!!|ASTROM| AttributeError: type object 'Client' has no attribute 'request'
17:34:21.275-!!|ASTROM|
17:34:21.513-|ASTROM| ***************************************************************************
17:34:21.536-@!|ASTROM| W[40-003-00005]: Recipe apero_astrometrics has NOT been successfully completed
17:34:21.565-
|ASTROM| ***************************************************************************

@njcuk9999
Copy link
Owner

This is a problem with the gspread pandas module (again).

It seems something to do with how pip installs gspread and gspread-pandas

I've updated v0.7.290-stable-test with a force in the requirements files - can you try doing a pip install again after doing a git pull (you may need to start from a new conda environment)

@larnoldgithub
Copy link
Collaborator Author

I'm going to install a fresh 290 version on another machine for test. (with *developper.txt requirements)

@larnoldgithub
Copy link
Collaborator Author

larnoldgithub commented Oct 4, 2024

@njcuk9999 the installation fails with the gspread lib: looks like a typo in the developper.txt file.
requirement gspraed==5.12.4

8.148 Collecting gspread-pandas==3.2.2 (from -r requirements_developer.txt (line 10))
8.228   Downloading gspread_pandas-3.2.2-py2.py3-none-any.whl.metadata (10 kB)
8.417 ERROR: Ignored the following versions that require a different python version: 6.1.0 Requires-Python >=3.10; 6.1.0rc1 Requires-Python >=3.10; 6.1.1 Requires-Python >=3.10; 6.1.2 Requires-Python >=3.10; 6.1.3 Requires-Python >=3.10; 6.1.4 Requires-Python >=3.10
8.418 ERROR: Could not find a version that satisfies the requirement gspraed==5.12.4 (from versions: none)
8.421 ERROR: No matching distribution found for gspraed==5.12.4
------
failed to solve: process "/bin/bash -c pip install -r requirements_developer.txt" did not complete successfully: exit code: 1

@larnoldgithub
Copy link
Collaborator Author

larnoldgithub commented Oct 4, 2024

Ok I did the change on github and a commit for the requirements_developer.txt

The error I had before at the installation is fixed, but I have another one now when running ./install_script.sh:

Module check:
        Passed: astropy (5.3 >= 5.3)
        Passed: astroquery (0.4.6 >= 0.4.6)
Downloading https://hpiers.obspm.fr/iers/eop/eopc04/eopc04.1962-now
|==========================| 5.0M/5.0M (100.00%)         1s
        Passed: barycorrpy (0.4.4 >= 0.4.4)
        Passed: bottleneck (1.3.7 >= 1.3.7)
        Passed: duckdb (0.8.0 >= 0.8)
        Passed: matplotlib (3.7.1 >= 3.7.1)
        Passed: git (3.1.41 >= 3.1.41)
        Passed: gspread_pandas (3.2.2 >= 3.2.2)
E[00-000-00011]:        Fatal Error: apero requires module gspraed to be installed 
         i.e. pip install gspraed==5.12.4

@njcuk9999
Copy link
Owner

I think thats because you also need to do the requirements_current.txt (which the setup takes as the minimum required) - I've fixed both now so it should work.

@larnoldgithub
Copy link
Collaborator Author

I have deleted my last post. I have found how to edit in github. it seems now that the typo in requirements_current.txt is corrected.

@larnoldgithub
Copy link
Collaborator Author

ok so with requirements_current.txt, the installation is ok and trying the command apero_astrometrics.py Gl699 works (it says the object is already in the db).

@larnoldgithub
Copy link
Collaborator Author

same with requirements_developer.txt, apero_astrometrics now works; I'll use the 290 to enter the objects for 24A.

@njcuk9999
Copy link
Owner

It seems my push failed for the requirements_developer.txt not sure why it should be okay now

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