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

TypeError: No method matches given arguments for Person..ctor: #12

Open
rickspark4 opened this issue Mar 18, 2024 · 3 comments
Open

TypeError: No method matches given arguments for Person..ctor: #12

rickspark4 opened this issue Mar 18, 2024 · 3 comments

Comments

@rickspark4
Copy link

I am getting below error and not able to understand how to solve it,

i am trying to run below code as mentioned in pip documentation

from vedastro.calculators import SaturnInAries
from vedastro.objects import GeoLocation, Time, Person, Gender
import VedAstro.Library as VedAstro

Create a GeoLocation object for Tokyo, Japan

geolocation = GeoLocation(location="Tokyo", latitude=35.6895, longitude=139.6917).geolocation

Define the birth date, time, and time offset

date = "07/05/2010"
time = "06:42"
time_offset = "+09:00"

Create a Time object for the birth date, time, and time offset

time_ob = Time(date, time, time_offset, geolocation).time_object

Define the person's ID, user ID, notes, name, and gender

id = "1234"
user_id = "123"
notes = ""
name = "John Doe"
gender = Gender.Male

Create a Person object for John Doe with the provided details

john_doe = Person(id=id, user_id=user_id, name=name, gender=gender, birth_time=time_ob, notes=notes).person

do calculation to check if saturn is in aries at a given time

saturn_aries = VedAstro.HoroscopeCalculatorMethods.SaturnInAries(time_ob)

data if the astro event occured

occurrence = saturn_aries.Occuring

get the planets or houses related to this astro event

related_body = saturn_aries.RelatedBody

Print the results

print("Occurrence of Saturn in Aries:", occurrence)
print("Related celestial body:", related_body)

TypeError: No method matches given arguments for Person..ctor: (<class 'str'>, <class 'str'>, <class 'VedAstro.Library.Time'>, <class 'VedAstro.Library.Gender'>, <class 'str'>, <class 'str'>, <class 'NoneType'>)

@sengiv
Copy link
Contributor

sengiv commented Mar 25, 2024

Sorry for the late reply, i thought the issue was major so saved it for this week.....
now i see this simply the case of outdated code still in README file 😅

@rickspark4 check out the readme file now, it contains a working example
please report back if it works so we can close this issue

sengiv added a commit that referenced this issue Mar 25, 2024
@rickspark4
Copy link
Author

Hey @sengiv
New code is working now ,but the code you provided earlier is still throwing same error,
on the other hand there are certain python files that you provided in repo also not working

Regards:
Rick Spark

@sengiv
Copy link
Contributor

sengiv commented Mar 30, 2024

if possible please list the demo files that is causing error, they probably contain outdated code.
...also feel free to experiment and update code files and make PR 🙏

the repo basically needs spring cleaning 🧹
the core astro library is guaranteed fine atm, because the live API server is running on the same code base, and there's no errors.
So all errors you're experiencing is only due to "invalid or outdated syntax" via Python

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