Closed jrastinejad closed 2 years ago
I think I'm going to need more information on this!
Sent you an email at 1:53 pm - can resend if it didn't go through?
Ah, OK. I see it now. Will check it out. P
First problem is that the Asassn database record is not called AsAssnQ3cRecord(...) at line 151 but ASASSNQ3cRecord(...)! Second, the failure is at line 107/108 ... milliquas not asassn! Will see what's going on there.
Huh, there is obviously a circularity problem that I don't yet understand. You actually only need to import the _cli code as that imports the _filters which in turn imports the _orm. So:
from sassy_src.models.milliquas_q3c_orm_cli import from sassy_src.models.asassn_q3c_orm_cli import
If you do that the problem persists. However, if you reverse the order, the code runs successfully!
from sassy_src.models.asassn_q3c_orm_cli import from sassy_src.models.milliquas_q3c_orm_cli import
That will get you running but I'll plug away and see if I can see why it works one way and not the other.
P
OK, I have a copy of the code that works independently of the import. So, remove all imports of sassy_src.models.* etc and use:
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sassy_src.models import * from sassy_src.models.asassn_q3c_orm import AsAssnQ3cRecord from sassy_src.models.asassn_q3c_orm_filters import asassn_q3c_orm_filters from sassy_src.models.milliquas_q3c_orm import MilliQuasQ3cRecord from sassy_src.models.milliquas_q3c_orm_filters import milliquas_q3c_orm_filters
Obviously, we're removing any circularity problem by doing more explicit imports.
If you want to see my code directly, look at either /home/phil_daly/catalogs_problem3.py or /home/phil_daly/catalogs_problem4.py - they only differ by the import order and both appear to work.
Let me know if these work for you.
Thanks a lot, Phil! Sorry for the slow response - I was traveling all day. Will take a look Monday.
And don’t worry Dave, I’ll make sure to comment on the issue!!!
On Apr 29, 2022, at 11:29 AM, Phil Daly @.***> wrote:
OK, I have a copy of the code that works independently of the import. So, remove all imports of sassy_src.models.* etc and use:
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sassy_src.models import * from sassy_src.models.asassn_q3c_orm import AsAssnQ3cRecord from sassy_src.models.asassn_q3c_orm_filters import asassn_q3c_orm_filters from sassy_src.models.milliquas_q3c_orm import MilliQuasQ3cRecord from sassy_src.models.milliquas_q3c_orm_filters import milliquas_q3c_orm_filters
Obviously, we're removing any circularity problem by doing more explicit imports.
If you want to see my code directly, look at either /home/phil_daly/catalogs_problem3.py or /home/phil_daly/catalogs_problem4.py - they only differ by the import order and both appear to work.
Let me know if these work for you.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were assigned.
All fixed! Thanks again, Phil
needed in order to query catalog