Closed AntoniaR closed 1 year ago
Without looking, this seems more likely to be due to a change in SQLAlchemy than in the TraP itself.
Actually, looking at the setup.py, I see we are pinning to a pretty old version (sqlalchemy>=1.0.0,<1.4.0
). It may be that the best answer here is just to upgrade to a modern version.
Hmmm... good point, we should probably switch to the latest versions of all the packages in setup.py. I will try that now.
Just checked and the setup.py in the pull request branch is already using all the latest versions:
install_requires = """
astropy
colorlog
numpy
psycopg2
python-casacore
python-dateutil
pytz
scipy
sqlalchemy
alembic
monotonic
psutil
pytest
dask
dask[array]
""".split()
I think you're right that it is something that has changed in SQLAlchemy, perhaps new formatting in the latest version?
Oh, yes, that makes sense. You are explicitly picking up changes in SQLAlchemy 2, which was just released the other day. If you unpin versions, TraP will need to be updated to work with the new version.
Yes, that would be very helpful. Thanks! Antonia
Dr. Antonia Rowlinson
Associate Professor Anton Pannekoek Institute, University of Amsterdam @.**@.>
Associate Scientist ASTRON, Netherlands Institute for Radio Astronomy @.**@.>
From: Hanno Spreeuw @.> Date: Monday, 6 February 2023 at 12:29 To: transientskp/tkp @.> Cc: Antonia Rowlinson @.>, Assign @.> Subject: Re: [transientskp/tkp] trap-manage.py initdb fails with SQLAlchemy language error (Issue #604)
Somehow does not break any unit test from the converted_to_python3_with_sourcefinder_from_pyse_repo branch. Should I add a unit test to catch it?
— Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftransientskp%2Ftkp%2Fissues%2F604%23issuecomment-1418933819&data=05%7C01%7Cb.a.rowlinson%40uva.nl%7C7cf9c8192fd64e3799a208db083566ab%7Ca0f1cacd618c4403b94576fb3d6874e5%7C0%7C0%7C638112797669532490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mGQ%2BU6lrvxFQq2Lsv%2FLnTLbTfBeS8%2FKT5MByiGTolLM%3D&reserved=0, or unsubscribehttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAANNSBEG2ZZIA6CKVNGW65TWWDOBHANCNFSM6AAAAAAUNNZA6Y&data=05%7C01%7Cb.a.rowlinson%40uva.nl%7C7cf9c8192fd64e3799a208db083566ab%7Ca0f1cacd618c4403b94576fb3d6874e5%7C0%7C0%7C638112797669532490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eCzlNSmzMmGM5AnCdWJZ%2BUrZUsIf82FPFSpJvR0wYVI%3D&reserved=0. You are receiving this because you were assigned.Message ID: @.***>
Yeah, sorry, you replied to a comment that I removed yesterday, since the error did appear from trap-manage.py initdb
with SQLAlchemy 2 which I guess also breaks almost any unit test involving a db.
I mistakenly thought it did not since there was an 1.x version of SQLAlchemy in my virt env.
This issue is solved by setting sqlalchemy==1.4
in setup.py
A nicer solution would be to upgrade to sqlalchemy 2.
Closing this issue as the workaround is fine.
Using the TraP version from this Pull request #596 and python release 3.10.9 in a conda environment.
I set up a pipeline.cfg file as normal to create a new database for running the tests on this pull request version. I then run
trap-manage.py initdb
in the same folder as the pipeline.cfg file. I then get this error message and fail to make a database: