Git Product home page Git Product logo

g-battaglia / kerykeion Goto Github PK

View Code? Open in Web Editor NEW
278.0 18.0 98.0 2.72 MB

Data driven Astrology 💫 Kerykeion is a python library for astrology.
It can generate SVG charts and extract all data about a birthchart, a composite chart and a transit chart.

Home Page: https://kerykeion.net

License: GNU Affero General Public License v3.0

Python 100.00%
astrology birthchart synastry svg astrologer astrology-calculator astronomical-algorithms python zodiac-algorithm zodiac-sign

kerykeion's Introduction

Kerykeion

 

Kerykeion is a python library for Astrology. It can calculate all the planet and house position, also it can calculate the aspects of a single persone or between two, you can set how many planets you need in the settings in the utility module. It also can generate an SVG of a birthchart, a synastry chart or a transit chart.

The core goal of this project is to provide a simple and easy approach to astrology in a data driven way.

Here's an example of a birthchart:

Kanye Birth Chart

Web API

If you want to use Kerykeion in a web application, I've created a web API for this purpose, you can find it here:

AstrologerAPI

It's open source, it's a way to support me and the project.

Donate

Maintaining this project is a lot of work, the Astrologer API doesn't nearly cover the costs of a software engineer working on this project full time. I do this because I love it, but until I can make this my full time job, I won't be able to spend as much time on it.

If you want to support me, you can do it here:

ko-fi

Installation

Kerykeion is a Python 3.9 package, make sure you have Python 3.9 or above installed on your system.

pip3 install kerykeion

Basic Usage

The basic usage of the library is to create an instance of the AstrologicalSubject class and then access the properties of the instance to get the astrological information about the subject.

Here's an example:

# Import the main class for creating a kerykeion instance:
from kerykeion import AstrologicalSubject

# Create a kerykeion instance:
# Args: Name, year, month, day, hour, minuts, city, nation
kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")

# Get the information about the sun in the chart:
# (The position of the planets always starts at 0)
kanye.sun

#> {'name': 'Sun', 'quality': 'Mutable', 'element': 'Air', 'sign': 'Gem', 'sign_num': 2, 'pos': 17.598992059774275, 'abs_pos': 77.59899205977428, 'emoji': '♊️', 'house': '12th House', 'retrograde': False}

# Get information about the first house:
kanye.first_house

#> {'name': 'First_House', 'quality': 'Cardinal', 'element': 'Water', 'sign': 'Can', 'sign_num': 3, 'pos': 17.995779673209114, 'abs_pos': 107.99577967320911, 'emoji': '♋️'}

# Get element of the moon sign:
kanye.moon.element

#> 'Water'

To avoid connecting to GeoNames (eg. avoiding hourly limit or no internet connection) you should instance kerykeion like this:

kanye = AstrologicalSubject(
    "Kanye", 1977, 6, 8, 8, 45, lng=50, lat=50, tz_str="Europe/Rome", city="Rome"
)

The difference is that you have to pass the longitude, latitude and the timezone string, instead of the city and nation. If you omit the nation, it will be set to "GB" by default, but the value is not used for calculations. It's better to set it to the correct value though.

Generate a SVG Chart

Birth Chart

from kerykeion import AstrologicalSubject, KerykeionChartSVG


birth_chart = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
birth_chart_svg = KerykeionChartSVG(birth_chart)

birth_chart_svg.makeSVG()

The SVG file will be saved in the home directory. John Lennon Birth Chart

Synastry Chart

from kerykeion import AstrologicalSubject, KerykeionChartSVG

first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")

# Set the type, it can be Natal, Synastry or Transit
synastry_chart = KerykeionChartSVG(first, "Synastry", second)
synastry_chart.makeSVG()

John Lennon and Paul McCartney Synastry

Change the output directory

By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:

from kerykeion import AstrologicalSubject, KerykeionChartSVG

first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
second = AstrologicalSubject("Paul McCartney", 1942, 6, 18, 15, 30, "Liverpool", "GB")

# Set the output directory to the current directory
synastry_chart = KerykeionChartSVG(first, "Synastry", second, new_output_directory=".")
synastry_chart.makeSVG()

Change Language

To change the language of the chart you should create a new kr.config.js file and pass it to the BirthChartSVG class. So far the available languages are English, Portuguese, Italian, Spanish, French and Chinese.

Some examples here.

Report

To print a report of all the data:

from kerykeion import Report, AstrologicalSubject

kanye = AstrologicalSubject("Kanye", 1977, 6, 8, 8, 45, "Atlanta", "US")
report = Report(kanye)
report.print_report()

Returns:

+- Kerykeion report for Kanye -+
+----------+------+-------------+-----------+----------+
| Date     | Time | Location    | Longitude | Latitude |
+----------+------+-------------+-----------+----------+
| 8/6/1977 | 8:45 | Atlanta, US | -84.38798 | 33.749   |
+----------+------+-------------+-----------+----------+
+-----------+------+-------+------+----------------+
| Planet    | Sign | Pos.  | Ret. | House          |
+-----------+------+-------+------+----------------+
| Sun       | Gem  | 17.6  | -    | Twelfth_House  |
| Moon      | Pis  | 16.43 | -    | Ninth_House    |
| Mercury   | Tau  | 26.29 | -    | Eleventh_House |
| Venus     | Tau  | 2.03  | -    | Tenth_House    |
| Mars      | Tau  | 1.79  | -    | Tenth_House    |
| Jupiter   | Gem  | 14.61 | -    | Eleventh_House |
| Saturn    | Leo  | 12.8  | -    | Second_House   |
| Uranus    | Sco  | 8.27  | R    | Fourth_House   |
| Neptune   | Sag  | 14.69 | R    | Fifth_House    |
| Pluto     | Lib  | 11.45 | R    | Fourth_House   |
| Mean_Node | Lib  | 21.49 | R    | Fourth_House   |
| True_Node | Lib  | 22.82 | R    | Fourth_House   |
| Chiron    | Tau  | 4.17  | -    | Tenth_House    |
+-----------+------+-------+------+----------------+
+----------------+------+----------+
| House          | Sign | Position |
+----------------+------+----------+
| First_House    | Can  | 18.0     |
| Second_House   | Leo  | 9.51     |
| Third_House    | Vir  | 4.02     |
| Fourth_House   | Lib  | 3.98     |
| Fifth_House    | Sco  | 9.39     |
| Sixth_House    | Sag  | 15.68    |
| Seventh_House  | Cap  | 18.0     |
| Eighth_House   | Aqu  | 9.51     |
| Ninth_House    | Pis  | 4.02     |
| Tenth_House    | Ari  | 3.98     |
| Eleventh_House | Tau  | 9.39     |
| Twelfth_House  | Gem  | 15.68    |
+----------------+------+----------+

And if you want to export it to a file:

python3 your_script_name.py > file.txt

Other examples of possible use cases:

# Get all aspects between two persons:

from kerykeion import SynastryAspects, AstrologicalSubject
first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma", "IT")
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma", "IT")

name = SynastryAspects(first, second)
aspect_list = name.get_relevant_aspects()
print(aspect_list[0])

#> Generating kerykeion object for Jack...
#> Generating kerykeion object for Jane...
#> {'p1_name': 'Sun', 'p1_abs_pos': 84.17867971515636, 'p2_name': 'Sun', 'p2_abs_pos': 211.90472999502984, 'aspect': 'trine', 'orbit': 7.726050279873476, 'aspect_degrees': 120, 'color': '#36d100', 'aid': 6, 'diff': 127.72605027987348, 'p1': 0, 'p2': 0}

Ayanamsa (Sidereal Modes)

By default, the zodiac type is set to Tropic (Tropical). You can set the zodiac type to Sidereal and the sidereal mode in the AstrologicalSubject class:

johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", zodiac_type="Sidereal", sidereal_mode="LAHIRI")

More examples here.

Full list of supported sidereal modes here.

Houses Systems

By default, the houses system is set to Placidus. You can set the houses system in the AstrologicalSubject class:

johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", houses_system="M")

More examples here.

Full list of supported house systems here.

So far all the available houses system in the Swiss Ephemeris are supported but the Gauquelin Sectors.

Perspective Type

By default, the perspective type is set to Apparent Geocentric (the most common standard for astrology). The perspective indicates the point of view from which the chart is calculated (Es. Apparent Geocentric, Heliocentric, etc.). You can set the perspective type in the AstrologicalSubject class:

johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", perspective_type="Heliocentric")

More examples here.

Full list of supported perspective types here.

Alternative Initialization

You can initialize the AstrologicalSubject from a UTC ISO 8601 string:

subject = AstrologicalSubject.get_from_iso_utc_time(
    "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US")

Note : The default time zone is UTC, with Greenwich longitude and latitude.

The default online/offline mode is set to offline, if you set it online the default latitude and longitude will be ignored and calculated from the city and nation. Remember to pass also the geonames_username parameter if you want to use the online mode, like this:

from kerykeion.astrological_subject import AstrologicalSubject

# Use the static method get_from_iso_utc_time to create an instance of AstrologicalSubject
subject = AstrologicalSubject.get_from_iso_utc_time(
    "Johnny Depp", "1963-06-09T05:00:00Z", "Owensboro", "US", online=True)

Documentation

Most of the functions and the classes are self documented by the types and have docstrings. An auto-generated documentation is available here.

Sooner or later I'll try to write an extensive documentation.

Development

You can clone this repository or download a zip file using the right side buttons.

Contributing

Feel free to contribute to the code!

License

This project is licensed under the AGPL-3.0 License. To understand how this impacts your use of the software, please see the LICENSE file for details. If you have questions, you can reach out to me at my email address. As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.

You can implement the logic of kerykeion in your project and also keep it closed source by using a third party API, like the AstrologerAPI. The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.

kerykeion's People

Contributors

alexsmithbr avatar century-boy avatar daminals avatar dependabot[bot] avatar e-werd avatar g-battaglia avatar gallica-lupus avatar gavrilov avatar gaycodegal avatar martynasj avatar mateuszmp avatar ourania-entoli avatar paladinic avatar paracosm17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kerykeion's Issues

Add IC, DESC, MC and ASC to the Planet list (Improvement)

Is there a way to parse the "IC, DESC, MC and ASC degrees?" I would love to include those degrees in a horoscope price conversion script I just finished up on.

Data points:
It looks like the SVG print the Asc and MC degrees. Where can I parse those degrees? Thanks

Some day angles is not coming

When i am running following code on 22nd May 2023 I am getting angles between Jupiter and Moon but when running same code on 23 May 2023 I am not getting angle between Jupiter and Moon

  def get_angles(Begindatestring = "2023/07/18"):
  Begindate = datetime.strptime(Begindatestring, "%Y/%m/%d")

  Enddate = Begindate + timedelta(days=0)
  pos = GeoPos('18N58', '72N50')
  date = Datetime(Enddate.strftime("%Y/%m/%d"), '09:30', '+05:30')


      # Create a kerykeion instance:
      # Args: Name, year, month, day, hour, minuts, city, nation(optional)
  kanye = KrInstance("Kanye", Enddate.year, Enddate.month,Enddate.day, 9, 15,city='Mumbai',nation ='IN',tz_str ='Asia/Kolkata')
  kanye1 = KrInstance("Kanye1", Enddate.year, Enddate.month,Enddate.day, 9, 15,city='Mumbai',nation ='IN',tz_str ='Asia/Kolkata')


  
  name = CompositeAspects(kanye, kanye1)
  aspect_list = name.get_all_aspects() # name.get_relevant_aspects()
  df = pd.DataFrame(aspect_list)
  # ipdb.set_trace()
  df['P1_P2'] = df['p1_name'] + '-' + df['p2_name']
  # print(df)

  df2 = pd.pivot_table(df,index=None, columns='P1_P2', values='aspect_degrees')

  # # Rename the columns to combine 'p1_name' and 'p2_name'
  # df2.columns = [f"{col} {df2.columns[0].split()[1]}" for col in df2.columns]

  # ipdb.set_trace()
  # df2.drop('P1_P2',inplace=True)
  df2['date'] = Enddate
  # print(df2)
  return df2````

Hourly Limit

Hi, is there any way to remove the hourly limit mentioned in the following error message:

"ERROR:root:Geonames API response could not be parsed! Maybe you exceeded API hourly limit?
ERROR:root:String that failed to parse:

<status message="the hourly limit of 1000 credits for century.boy has been exceeded. Please throttle your requests or use the commercial service." value="19"/>

I am trying to preprocess 85000 records to prepare a data set for an AI, can anyone gieve ideas? Thanks!

How to save SVG file to other directory ?

result from example code:

root@racknerd-37dc98:/home/benny/khirito# python3.9 singlesvg.py
Semarx birth location: Surabaya, -7.24917, 112.75083
SVG Generated Correctly in: /root
19

how to change save file to other directory?

license

Hello Greeting
is it possible to integrate kerykeion and use in personal project?
will there be any issue regarding the license and copyright?

add pydantic as a dependency

In a clean install when trying to use kerykeion I get:

File ".../lib/python3.9/site-packages/kerykeion/types.py", line 9, in <module>
    from pydantic import BaseModel
ModuleNotFoundError: No module named 'pydantic'

ImportError: cannot import name 'wraps'

from functools import wraps
ImportError: cannot import name 'wraps' from partially initialized module 'functools'

Getting above error. I am on Python version 3.11.3

SVG Encoding error

Browser isn't able to render properly. Getting the following error:

This page contains the following errors:
error on line 18 at column 60: Encoding error
Below is a rendering of the page up to the first error.


It renders properly up till birth date and time, so essentially renders 4 lines (including the name). of course, renders fine when I remove the degree symbol in an editor. Not sure what's going on. Perhaps need different encoding for 'deg' circle

Sidereal houses calculation

Hi! Could you modify the main.py line 210 for this ? This will calculates the sidereal houses correctly.

        """
        https://www.astro.com/faq/fq_fh_owhouse_e.htm
        https://github.com/jwmatthys/pd-swisseph/blob/master/swehouse.c#L685
        hsys = letter code for house system;
            A  equal
            E  equal
            B  Alcabitius
            C  Campanus
            D  equal (MC)
            F  Carter "Poli-Equatorial"
            G  36 Gauquelin sectors
            H  horizon / azimut
            I  Sunshine solution Treindl
            i  Sunshine solution Makransky
            K  Koch
            L  Pullen SD "sinusoidal delta", ex Neo-Porphyry
            M  Morinus
            N  equal/1=Aries
            O  Porphyry
            P  Placidus
            Q  Pullen SR "sinusoidal ratio"
            R  Regiomontanus
            S  Sripati
            T  Polich/Page ("topocentric")
            U  Krusinski-Pisa-Goelzer
            V  equal Vehlow
            W  equal, whole sign
            X  axial rotation system/ Meridian houses
            Y  APC houses
        """

        # creates the list of the house in 360°
        if self.zodiac_type == "Sidereal":
            self.houses_degree_ut = swe.houses_ex(tjdut=self.julian_day,
                                                  lat=self.lat,
                                                  lon=self.lng,
                                                  hsys=str.encode('P'),
                                                  flags=swe.FLG_SIDEREAL)[0]

        else:
            self.houses_degree_ut = swe.houses(tjdut=self.julian_day,
                                               lat=self.lat,
                                               lon=self.lng,
                                               hsys=str.encode('P'))[0]

unexpected keyword argument 'lang' error.

Hello,
I have a kr.config.json file located in the same location as the .py file. I don't use their original language translations in svg either. got an unexpected keyword argument 'lang' error.
The code I use is as follows:
name = KerykeionChartSVG(first, chart_type="Natal", new_output_directory="test", lang="MyLanguage" ,new_settings_file="kr.config.json")

How will I use these features?

TypeError: 'type' object is not subscriptable

System: Ubuntu 20.04. Python 3.8

Traceback (most recent call last):
File "kerykeiontest.py", line 1, in
from kerykeion import KrInstance, MakeSvgInstance
File "/home/pedja/.local/lib/python3.8/site-packages/kerykeion/init.py", line 141, in
from .main import KrInstance
File "/home/pedja/.local/lib/python3.8/site-packages/kerykeion/main.py", line 13, in
from kerykeion.fetch_geonames import FetchGeonames
File "/home/pedja/.local/lib/python3.8/site-packages/kerykeion/fetch_geonames.py", line 18, in
class FetchGeonames:
File "/home/pedja/.local/lib/python3.8/site-packages/kerykeion/fetch_geonames.py", line 50, in FetchGeonames
def __get_timezone(self, lat: Union[str, float, int], lon: Union[str, float, int]) -> dict[str, str]:
TypeError: 'type' object is not subscriptable

Improvment: the ability to get only transits aspects to natal chart or vice versa

from kerykeion import KrInstance, MakeSvgInstance

def create_svg_chart(name1, year1, month1, day1, hour1, minute1, city1, country1, zodica_type1,
name2, year2, month2, day2, hour2, minute2, city2, country2, zodica_type2):

first = KrInstance(name1, year1, month1, day1, hour1, minute1, city1, country1, zodica_type1)
second = KrInstance(name2, year2, month2, day2, hour2, minute2, city2, country2, zodica_type2)

name = CompositeAspects(first, second)
# get the aspects from transits to natal
aspect_list = name.get_relevant_aspects() # This still gives me too many aspects, I only want the aspect from transits to natal. 


df = pd.DataFrame(aspect_list)
return df 

Feature request: add a cache for geonames

I suggest calling an internal proxy when using geonames such as to only connect to it once for a given location even if there's many KrInstance objects for the same location.
I didn't realize geonames was queried every time and created KrInstace objects in a loop with millions or iterations and received a time ban from geonames for effectively launching a denial-of-service against them.

Problem with open Natal chart type svg

Here is my code:

import kerykeion as kr
from kerykeion.utilities.charts import MakeSvgInstance

first = kr.KrInstance("Jack", 1990, 6, 15, 15, 15, "Roma")

name = MakeSvgInstance(first)
# name = MakeSvgInstance(first, chart_type="Natal")
name.output_directory = "./charts/"
name.makeSVG()

It worked very well, but when I try to open it in browsers or make png, I got errors.
This is in browsers:

This page contains the following errors:
error on line 18 at column 60: Encoding error
Below is a rendering of the page up to the first error.
Jack
Info:
Roma
1999-9-30 10:30

And this occurred when I try to create PNG using svglib lib:
AttributeError: 'NoneType' object has no attribute 'renderScale'

Bad location in report (London instead of Paris)

Hi, there is a bug whene generating report without GeoName.

I'm using Python 3.9.13 on Windows with Jupyter Notebook

kanye = KrInstance(
    "Name", 1990, 5, 5, 15, 50,
    lng=2.3488, lat=48.8534, tz_str="Europe/Paris"
    )
report = Report(kanye)
report.print_report()
print(repr(report.__dict__))
  • Kerykeion report for Name -+
    +----------+-------+----------+-----------+----------+
    | Date | Time | Location | Longitude | Latitude |
    +----------+-------+----------+-----------+----------+
    | 5/5/1990 | 15:50 | London, | 2.3488 | 48.8534 |
    +----------+-------+----------+-----------+----------+
    ...
    Birth location: London, Lat 48.8534, Lon 2.3488
    ...

The script is not about to find the city is Paris, FR and not London...

TypeError: 'float' object is not subscriptable

System: Mac OS. Python 3.7
Installation: pip3 install Kerykeion

/usr/local/lib/python3.7/site-packages/kerykeion/astrocore.py in planets_lister(self)
    221 
    222         """Calculates the position of the planets and stores it in a list."""
--> 223         self.sun_deg = swe.calc(self.j_day, 0, self.iflag)[0][0]
    224         self.moon_deg = swe.calc(self.j_day, 1, self.iflag)[0][0]
    225         self.mercury_deg = swe.calc(self.j_day, 2, self.iflag)[0][0]

TypeError: 'float' object is not subscriptable

Declinations

Hey, this project doesn't seem to support declinations. Am I right? Parallels and contra-parallels are the strongest aspects. I'm happy to help or answer any questions.

PS: Have you seen Dubay's 200 proofs? I highly encourage you to watch it with an open mind!

Cheers!

Having issue with MakeSvgInstance

Code :
import kerykeion as kr
from kerykeion.utilities.charts import MakeSvgInstance
first = kr.KrInstance("Jack", 1990, 6, 15, 15, 15, "Roma")
second = kr.KrInstance("Jane", 1991, 10, 25, 21, 00, "Roma")
name = MakeSvgInstance(first, chart_type="Composite", second_obj=second)
name.makeSVG()
print(len(name.aspects_list))

Error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1341: character maps to

I do run an example, shows this error. Please help to fix this issue as earliest.

Note: I have updated your recent version as well
" Successfully installed cattrs-1.10.0 kerykeion-2.3.2 requests-cache-0.9.3 url-normalize-1.4.3 "

Thanks

Permission error "write a readonly database"

Hello,

I can run my app with kerykeion on local however I have these errors when i put it on my server... All perms are good (777) and the city also. I don't understand why I got these errors which are not correlated to my bug. What is the first error ? "attempt to write a readonly database" ? is it from http://api.geonames.org/searchJSON ? Errors are not clear at all

PermissionError(13, 'Permission denied')

Full traceback :

2023-06-14 11:55:17,591 - KrInstance - ERROR - Error in fetching http://api.geonames.org/searchJSON: attempt to write a readonly database
2023-06-14 11:55:17,591 - KrInstance - ERROR - Error in fetching timezone: 'lat'
raise KerykeionException(
kerykeion.types.KerykeionException: No data found for this city, try again! Maybe check your connection?

'<' not supported between instances of 'tuple' and 'int'

System: Mac OS. Python 3.7

/usr/local/lib/python3.7/site-packages/kerykeion/astrocore.py in pos_calc(self, degree, number_name, label)
    109         """A function to be used in others to create a dictionary deviding 
    110         the houses or the planets list."""
--> 111 
    112         if degree < 30:
    113             hou_dic = {label: number_name, "quality": "Cardinal", "element":

TypeError: '<' not supported between instances of 'tuple' and 'int'

Very interesting project!

Calculate Elements outside MakeSVG

Hi, thanks for your great project!
Is there a chance to calculate the elements as a separate class, instead of being available only when creating the SVG?
I'm using kerykeion in a Jup Notebook and using pandas for the visualization

Error with Aspect() & Planet_house() and not working

Code :
print(kanye.planets_house()[0])
print(kanye.aspects()['all']['Sun'])

Error :
AttributeError: 'KrInstance' object has no attribute 'planets_house'
AttributeError: 'KrInstance' object has no attribute 'aspects'

I am executing the same example but throws error. Update the packages, still facing issue.

Thanks

Planet names are not appearing for some planets in sn.aspects

Some of the planet names are turning up as numbers, rather than the names of the planets. e.g see below for example 1 Moon - is this meant to be Sun Moon?

Saturn Mars 1.0 Sesquiquadrate
Saturn 1 2.0 Square
Saturn 10 -6.4 Oposition
1 Moon -0.3 Sesquiquadrate
1 Venus -1.8 Trigon
1 Jupiter -1.5 Semisextil
1 10 2.0 Semisquare
10 Saturn 7.6 Conjuction
10 1 5.7 Trigon

problem with the print(output(steph))

It return an error:

Traceback (most recent call last):
File "/home/steph/dev/AstroProject/test-kerykeion.py", line 21, in
print(output(steph))
File "/home/steph/dev/AstroProject/lib/python3.8/site-packages/kerykeion/output_exemple.py", line 11, in output
p = user.planets_house()
AttributeError: 'KrInstance' object has no attribute 'planets_house'

Process finished with exit code 1

And effectively, user, which is a kerykion instance has no attribute planets_house.

Regards,

Steph

Issue with Generating SVG chart example

from kerykeion import AstrologicalSubject, KerykeionChartSVG

first = AstrologicalSubject("Jack", 1990, 6, 15, 15, 15, "Roma")
second = AstrologicalSubject("Jane", 1991, 10, 25, 21, 00, "Roma")

Set the type, it can be Natal, Synastry or Transit

name = KerykeionChartSVG(first, chart_type="Synastry", second_obj=second)
name.makeSVG()
print(len(name.aspects_list))

#> Generating kerykeion object for Jack...
#> Generating kerykeion object for Jane...
#> Jack birth location: Roma, 41.89193, 12.51133
#> SVG Generated Correctly
#> 38

ERROR:


UnicodeDecodeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_8032/3053983563.py in
6 # Set the type, it can be Natal, Synastry or Transit
7
----> 8 name = KerykeionChartSVG(first, chart_type="Synastry", second_obj=second)
9 name.makeSVG()
10 print(len(name.aspects_list))

~\AppData\Roaming\Python\Python39\site-packages\kerykeion\charts\kerykeion_chart_svg.py in init(self, first_obj, chart_type, second_obj, new_output_directory, new_settings_file)
73 self.full_width = 1200
74
---> 75 self.parse_json_settings(new_settings_file)
76 self.chart_type = chart_type
77

~\AppData\Roaming\Python\Python39\site-packages\kerykeion\charts\kerykeion_chart_svg.py in parse_json_settings(self, settings_file)
280 Parse the settings file.
281 """
--> 282 settings = get_settings_dict(settings_file)
283
284 language = settings["general_settings"]["language"]

~\AppData\Roaming\Python\Python39\site-packages\kerykeion\settings\kerykeion_settings.py in get_settings_dict(new_settings_file)
217 logger.debug(f"Kerykeion config file path: {settings_file}")
218 with open(settings_file, "r") as f:
--> 219 settings_dict = load(f)
220
221 return settings_dict

C:\ProgramData\Anaconda3\lib\json_init_.py in load(fp, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
291 kwarg; otherwise JSONDecoder is used.
292 """
--> 293 return loads(fp.read(),
294 cls=cls, object_hook=object_hook,
295 parse_float=parse_float, parse_int=parse_int,

C:\ProgramData\Anaconda3\lib\encodings\cp1252.py in decode(self, input, final)
21 class IncrementalDecoder(codecs.IncrementalDecoder):
22 def decode(self, input, final=False):
---> 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0]
24
25 class StreamWriter(Codec,codecs.StreamWriter):

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2455: character maps to

Request: Support for the asteroid Juno

I'd like to include which sign the asteroid Juno is in for a project I'm working on, is this something that's easy to add to this tool? Happy to help implement it if you can point me in the direction of where to get started.

Thanks!

Birth Location in charts created with lat/lon set to default

I am creating charts using lat/lon like this:
kanye = KrInstance( "Kanye", 1977, 6, 8, 8, 45, lng=50, lat=50, tz_str="Europe/Rome" )

The chart shows the coordinates correctly, except the birth location, this is set to the default 'London' in every single output.
is there any way to add the location without connecting to GeoNames?

New Chinese File on Conflg.josn

The cups and planets language_settings translate to Chinese files. I can share the file, if this project is needed? Does upload it in here?

Standardize the outputs (for easy user data manipulation)

WHAT

  • the current data display is not standardized across the outputs
  • keep the full name not abbreviation (use can cut it by himself)
  • keep the angles in brackets
  • the data header, user name, separator name is not needed (user can add this by himself if it is needed)

WHY

Easy manipulation of data, customization of output.

HOW

VARIATION 1: Plain data

-------------------DON'T PRINT THIS LINE ------------------------------
NAME: Kanye

PLANETS

[Planet | Zodiac | House | Angle] not printed only in documentation
Sun: Gemini 12 (17.599)|
Moon: Pisces 9 (16.425)
Mercury: Taurus 11 (26.286)

HOUSES

[House | Zodiac | Angle] not printed only in documentation
1: Cancer (17.996)
2: Leo (9.506)
3: Virgin (4.022)

VARIATION 2: Alternative option to print output as markdown

-------------------DON'T PRINT THIS LINE ------------------------------
NAME: Kanye

PLANETS

Planet Zodiac House Angle
Sun Gemini 12 (17.599)
Moon Pisces 9 (16.425)
Mercury Taurus 11 (26.286)

HOUSES

House Zodiac Angle
1 Cancer (17.996)
2 Leo (9.506)
3 Virgin (4.022)

Another option ?

I would like to have the following options.

sidereal zodiac, tropical zodiac option
house system (koch regiomontanus) option

Rahu, Ketu, Lilith and Chiron

Hi! Love your project, would like to contribute implementation of these objects to your project. What would be a fastest way to do so? Thanks!

South Node calculation

Would it be feasible for the program to compute both South Node and return it in both individual and synastry aspects analysis?
Thank you very mucth!

can't decode byte 0x81 in position 1341

I'm trying to create chart SVG chart file with this code:
first = KrInstance("Jack", 1990, 6, 15, 15, 15, "Roma")

name = MakeSvgInstance(second, chart_type="Natal")
name.makeSVG()

and when i try to execute the code i receive this message:

Traceback (most recent call last):
File "C:\Users\mario\Desktop\University\Please 4.20\RandomTests\test3.py", line 10, in
name = MakeSvgInstance(second, chart_type="Natal")
File "C:\Users\mario\AppData\Local\Programs\Python\Python39\lib\site-packages\kerykeion\charts\charts_svg.py", line 139, in init
natal_aspects_instance = NatalAspects(
File "C:\Users\mario\AppData\Local\Programs\Python\Python39\lib\site-packages\kerykeion\aspects.py", line 25, in init
self._parse_json_settings()
File "C:\Users\mario\AppData\Local\Programs\Python\Python39\lib\site-packages\kerykeion\aspects.py", line 42, in parse_json_settings
settings = json.load(f)
File "C:\Users\mario\AppData\Local\Programs\Python\Python39\lib\json_init
.py", line 293, in load
return loads(fp.read(),
File "C:\Users\mario\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1341: character maps to

any suggestions ?

How to configure how many planets

Readme file mentions"u can set how many planets you need in the settings in the utility module". Could not find any such configuration there. Are all planet details not returned by default?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.