adstex icon indicating copy to clipboard operation
adstex copied to clipboard

Update to v0.6.1 working on OSX, failing on Ubuntu Linux

Open timrobishaw opened this issue 7 months ago • 2 comments

Used conda to create a new environment that installed new adstex v0.6.1 from conda-forge. The dependency ads v0.12.7 was installed:

ads 0.12.7 pyhd8ed1ab_0 conda-forge adstex 0.6.1 pyhd8ed1ab_0 conda-forge

adstex works fine on my MacBook now, but is choking on the very same latex file on my linux machine with the error:


Resolving keys that do not contain identifiers...

Traceback (most recent call last): File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/bin/adstex", line 10, in sys.exit(main()) ^^^^^^ File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/lib/python3.12/site-packages/adstex.py", line 512, in main bibcode = find_bibcode_interactive(key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/lib/python3.12/site-packages/adstex.py", line 248, in find_bibcode_interactive bibcode = authoryear2bibcode(fa, y, key, coauthors=ca) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/lib/python3.12/site-packages/adstex.py", line 190, in authoryear2bibcode entries = list( ^^^^^ File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/lib/python3.12/site-packages/ads/search.py", line 512, in next self.execute() File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/lib/python3.12/site-packages/ads/search.py", line 543, in execute self.response = SolrResponse.load_http_response( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/astro/lib/python3.12/site-packages/ads/base.py", line 94, in load_http_response raise APIResponseError(http_response.text) ads.exceptions.APIResponseError: '{"message": ""}'

Checking the API token via

python -c "from ads.base import BaseQuery; print(BaseQuery().token)"

returns my correct ADS token.

Any ideas what might be going wrong here? I have no clue what could be causing this problem.

timrobishaw avatar May 15 '25 19:05 timrobishaw

This seems to be related to #52 and https://github.com/andycasey/ads/issues/132. Can you try reinstalling ads?

yymao avatar May 15 '25 19:05 yymao

Thanks for the guidance. I wiped out ads and adstex, made sure there weren't separate conda and pip instances of either, created a new conda environment with only python v3.13.3, ads v0.12.7, and adstex v0.6.1, but still I get similar errors:

------------------------------------------------------------
Resolving keys that do not contain identifiers...
------------------------------------------------------------
Traceback (most recent call last):
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/bin/adstex", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/lib/python3.13/site-packages/adstex.py", line 512, in main
    bibcode = find_bibcode_interactive(key)
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/lib/python3.13/site-packages/adstex.py", line 248, in find_bibcode_interactive
    bibcode = authoryear2bibcode(fa, y, key, coauthors=ca)
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/lib/python3.13/site-packages/adstex.py", line 190, in authoryear2bibcode
    entries = list(
        fixedAdsSearchQuery(
    ...<5 lines>...
        )
    )
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/lib/python3.13/site-packages/ads/search.py", line 512, in __next__
    self.execute()
    ~~~~~~~~~~~~^^
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/lib/python3.13/site-packages/ads/search.py", line 543, in execute
    self.response = SolrResponse.load_http_response(
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.session.get(self.HTTP_ENDPOINT, params=self.query)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/robishawt/software/x86_64_Linux/miniconda3/envs/adstex/lib/python3.13/site-packages/ads/base.py", line 94, in load_http_response
    raise APIResponseError(http_response.text)
ads.exceptions.APIResponseError: '{"message": ""}'

I'll try to dig into the ADS API itself and see what's gone wonky here.

timrobishaw avatar May 15 '25 22:05 timrobishaw

@timrobishaw do you still encounter this issue with ADS?

yymao avatar Aug 25 '25 06:08 yymao

Sadly, yes. Works fine on MacBook Pro, but not on Ubuntu with conda-forge installations of ads and ads-tex:

ads                       0.12.7             pyhd8ed1ab_0    conda-forge
adstex                    0.6.1              pyhd8ed1ab_0    conda-forge

timrobishaw avatar Aug 27 '25 22:08 timrobishaw

Hmm, I have no idea either, but it seems the issue is with either NASA ADS or the ads package. You may want to open an issue in https://github.com/andycasey/ads to see if the author may have any ideas.

yymao avatar Aug 31 '25 20:08 yymao