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

Command line operation #10

Open
krishnakanthpps opened this issue Dec 14, 2017 · 31 comments
Open

Command line operation #10

krishnakanthpps opened this issue Dec 14, 2017 · 31 comments

Comments

@krishnakanthpps
Copy link

is it not possible to kind of tweak this to run it for a command line that gets us the data we need based on date and location?

@vvasuki
Copy link
Contributor

vvasuki commented Dec 14, 2017

@krishnakanthpps
Copy link
Author

krishnakanthpps commented Dec 14, 2017 via email

@vvasuki
Copy link
Contributor

vvasuki commented Dec 14, 2017

I meant the scripts in https://sanskrit-coders.github.io/jyotisha/build/html/jyotisha_panchangam.html#key-features .
Did you try gen_daily_cal.sh ? what command did you use?

@krishnakanthpps
Copy link
Author

getting this error. Running on AWS. Using Python3.

image

@vvasuki
Copy link
Contributor

vvasuki commented Dec 14, 2017

The following steps worked perfectly for me:

  • git clone git@github.com:karthikraman/panchangam.git
  • cd panchangam/bin/
  • sudo pip3 install git+https://github.com/sanskrit-coders/jyotisha@master -U
  • Install siddhAnta font (grr @karthikraman and his fondness of font beauty :-D Could you somehow include the fonts along with python code, @karthikraman ? )
  • ./gen_daily_cal.sh Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2017 devanagari lagna

I'll try to host this functionality as a web service (specifically Swagger documentation interface for a REST api) to make it more user friendly.

@vvasuki
Copy link
Contributor

vvasuki commented Dec 15, 2017

Added a basic web interface:
image

Example request URL: http://api.vedavaapi.org/jyotisha/jyotisha/v1/calendars/coordinates/13%3A05%3A24/80%3A16%3A12/years/2017?timezone=Asia%2FCalcutta&encoding=iast

@karthikraman - please feel free to add to or expand this - I think we should be able to serve ics files from such an interface; and we should develop a html/ javascript UI (which users would be able to print to PDF) which uses this REST API. That will be much more user friendly.

@krishnakanthpps
Copy link
Author

Thank you. That helps.

@aupasana
Copy link

aupasana commented Apr 16, 2019

@vvasuki, can you please verify that the steps here still work for you? I'm getting swisseph.Error: invalid time: 18:30:2016.00. Happy to setup a docker container with repro.

@vvasuki
Copy link
Contributor

vvasuki commented Apr 16, 2019

@aupasana - Just to check, you've installed the latest swisseph repo?
sudo pip3 install git+https://github.com/astrorigin/pyswisseph@master -U
as mentioned in the README?

Happy to setup a docker container with repro.

That's so wonderful! We don't have any reliable server and can think of building a nice interface if the backend API were available somewhere.

@vvasuki
Copy link
Contributor

vvasuki commented Apr 16, 2019

Please try sudo pip3 install git+https://github.com/astrorigin/pyswisseph@master -U as well. By default some older version is pulled.

@aupasana
Copy link

Thanks @vvasuki , that seems to resolve that particular issue. Once I get it working end to end. I'll submit a pull request with a dockerfile and instructions such that anyone can have a simple reliable environment to run commands against with minimal effort.

@aupasana
Copy link

aupasana commented Apr 16, 2019

Dockerfile that generates a working environment for those that are interested in going that route.

FROM python:3.7

RUN apt-get -y update && apt-get -y install texlive-xetex

WORKDIR /src
RUN git clone https://github.com/karthikraman/panchangam.git
RUN cd panchangam/bin && pip install git+https://github.com/sanskrit-coders/jyotisha@master -U && pip install git+https://github.com/astrorigin/pyswisseph@master -U

WORKDIR /src/panchangam/bin
ENTRYPOINT ["bash"]

@krishnakanthpps
Copy link
Author

Thank you @aupasana @vvasuki
I have been planning to set this up as an API, but had been time limited.

@karthikraman
Copy link
Contributor

karthikraman commented Feb 15, 2020 via email

@vvasuki
Copy link
Contributor

vvasuki commented Feb 20, 2020

नमस्कारः।

is it correct?

सम्यगिव भाति। स्वीये सङ्गणके चालयित्वा पश्येः - कथं चालनीयमित्यत्रालिखम् - deb85f4

Where do I learn more about this :)?

https://flask-restplus.readthedocs.io/en/stable/

Also, will it automatically reflect on api.vedavaapi.org? Or it has to be
pulled manually?

तत्र गत्वाक्रष्टव्यम्। किञ्च काचिद् विचित्र समस्या वर्तते तत्र -

[Wed Feb 19 20:35:08.010283 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504] mod_wsgi (pid=18413): Exception occurred processing WSGI script '/home/samskritam/jyotisha/wsgi/wsgi_app.py'.
[Wed Feb 19 20:35:08.010488 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504] Traceback (most recent call last):
[Wed Feb 19 20:35:08.010555 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]   File "/home/samskritam/jyotisha/wsgi/wsgi_app.py", line 18, in <module>
[Wed Feb 19 20:35:08.010567 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]     from jyotisha.rest_api import run
[Wed Feb 19 20:35:08.010583 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]   File "/home/samskritam/jyotisha/jyotisha/rest_api/run.py", line 10, in <module>
[Wed Feb 19 20:35:08.010592 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]     from jyotisha.rest_api import api_v1
[Wed Feb 19 20:35:08.010607 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]   File "/home/samskritam/jyotisha/jyotisha/rest_api/api_v1.py", line 9, in <module>
[Wed Feb 19 20:35:08.010615 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]     import jyotisha.panchangam.spatio_temporal.annual
[Wed Feb 19 20:35:08.010656 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]   File "/home/samskritam/jyotisha/jyotisha/panchangam/spatio_temporal/annual.py", line 16, in <module>
[Wed Feb 19 20:35:08.010665 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504]     from jyotisha.panchangam.temporal.festival import read_old_festival_rules_dict
[Wed Feb 19 20:35:08.010699 2020] [wsgi:error] [pid 18413] [remote 103.130.189.173:37504] ImportError: cannot import name 'read_old_festival_rules_dict'

@karthikraman
Copy link
Contributor

Perhaps this is simple? festival has to now be pulled as a git submodule? Presumably the api.vedavaapi.org website doesn't have the submodule configured...

@vvasuki
Copy link
Contributor

vvasuki commented Feb 21, 2020

Yes - that was it!
Did not realize that festival was a submodule! Would've expected just festival/data and festival/legacy_data to be separate. Still think that would be better design since the python code assumes a particular directory structure not replicated in the festival repo.

@vamsisvkrishna
Copy link

vamsi@MSI:~/panchang/panchangam-master/panchangam-master/bin$ ./gen_daily_cal.sh Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2075 devanagari 'hh:mm*' lagna
Computing 2075 daily panchangam for Chennai (13:05:24,80:16:12) - Asia/Calcutta in devanagari script...


DEBUG: 2020-09-11 18:35:47,485 {common.py:873}: {'DataSource': <class 'sanskrit_data.schema.common.DataSource'>, 'JsonObject': <class 'sanskrit_data.schema.common.JsonObject'>, 'JsonObjectNode': <class 'sanskrit_data.schema.common.JsonObjectNode'>, 'NamedEntity': <class 'sanskrit_data.schema.common.NamedEntity'>, 'SchemaError': <class 'jsonschema.exceptions.SchemaError'>, 'ScriptRendering': <class 'sanskrit_data.schema.common.ScriptRendering'>, 'Target': <class 'sanskrit_data.schema.common.Target'>, 'TargetValidationError': <class 'sanskrit_data.schema.common.TargetValidationError'>, 'Text': <class 'sanskrit_data.schema.common.Text'>, 'UllekhanamJsonObject': <class 'sanskrit_data.schema.common.UllekhanamJsonObject'>, 'ValidationError': <class 'jsonschema.exceptions.ValidationError'>}
No precomputed data available. Computing panchangam...
WARNING: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)" [astropy._erfa.core]
WARNING: 2020-09-11 18:35:48,489 {logger.py:204}: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)"
WARNING: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)" [astropy._erfa.core]
WARNING: 2020-09-11 18:35:48,493 {logger.py:204}: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)"

Writing computed panchangam to /home/vamsi/Documents/Chennai-2075.json...
WARNING: 2020-09-11 18:36:36,414 {periodical.py:1747}: Rare issue. No tithi 1 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,415 {periodical.py:1747}: Rare issue. No tithi 2 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,416 {periodical.py:1747}: Rare issue. No tithi 3 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,417 {periodical.py:1747}: Rare issue. No tithi 4 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,417 {periodical.py:1747}: Rare issue. No tithi 5 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,418 {periodical.py:1747}: Rare issue. No tithi 6 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,419 {periodical.py:1747}: Rare issue. No tithi 7 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,420 {periodical.py:1747}: Rare issue. No tithi 8 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,421 {periodical.py:1747}: Rare issue. No tithi 9 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,422 {periodical.py:1747}: Rare issue. No tithi 10 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,423 {periodical.py:1747}: Rare issue. No tithi 29 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-11 18:36:36,423 {periodical.py:1747}: Rare issue. No tithi 30 in this solar month (9). Therefore use lunar tithi.
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_tex.py", line 299, in
main()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_tex.py", line 287, in main
panchangam = jyotisha.panchangam.spatio_temporal.annual.get_panchangam(city=city, year=year, script=script, fmt=fmt, compute_lagnams=compute_lagnams, ayanamsha_id=zodiac.Ayanamsha.CHITRA_AT_180)
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/spatio_temporal/annual.py", line 46, in get_panchangam
panchangam.update_festival_details()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/spatio_temporal/periodical.py", line 1945, in update_festival_details
self.compute_festivals()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/spatio_temporal/periodical.py", line 1376, in compute_festivals
festival_rules = read_old_festival_rules_dict(os.path.join(CODE_ROOT, 'panchangam/temporal/festival/legacy/festival_rules.json'))
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/init.py", line 581, in read_old_festival_rules_dict
with open(file_name, encoding="utf-8") as festivals_data:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/legacy/festival_rules.json'

Any help on this please ? how to include festivals in this repository ?
Thanks a lot for your help

@vvasuki
Copy link
Contributor

vvasuki commented Sep 11, 2020

How did you install the jyotisha module? Please remove the module and install using the sudo pip install git+https://github.com/sanskrit-coders/jyotisha/@master -U emphasized in the updated README and see if you get /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/data/ directory (which is a submodule). If you don't, let me know - we might need to figure out how to get it to work seamlessly.

@karthikraman I just deleted the erstwhile festival submodule (making it a submodule was a bad/ ugly idea), and instead made festival/data a submodule. This entailed changes to this repo as well as adyatithi. You might want to replicate the changes in your computer.

@vamsisvkrishna
Copy link

vamsisvkrishna commented Sep 12, 2020

Thanks a lot for your quick response and help.

I have tried as per your inputs :
vamsi@MSI:~$ sudo pip3 install git+https://github.com/sanskrit-coders/jyotisha/@master -U
Collecting git+https://github.com/sanskrit-coders/jyotisha/@master
Cloning https://github.com/sanskrit-coders/jyotisha/ (to revision master) to /tmp/pip-req-build-a_7fqath
Running command git clone -q https://github.com/sanskrit-coders/jyotisha/ /tmp/pip-req-build-a_7fqath
Running command git submodule update --init --recursive -q
Requirement already satisfied, skipping upgrade: astropy in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (4.0.1.post1)
Requirement already satisfied, skipping upgrade: flask in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.1.2)
Requirement already satisfied, skipping upgrade: flask_cors in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (3.0.9)
Requirement already satisfied, skipping upgrade: flask_restplus in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (0.13.0)
Requirement already satisfied, skipping upgrade: geocoder in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.38.1)
Requirement already satisfied, skipping upgrade: geopy in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (2.0.0)
Requirement already satisfied, skipping upgrade: icalendar in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (4.0.7)
Requirement already satisfied, skipping upgrade: indic_transliteration in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.9.9)
Requirement already satisfied, skipping upgrade: jsonpickle in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.4.1)
Requirement already satisfied, skipping upgrade: numpy in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.19.1)
Requirement already satisfied, skipping upgrade: pandas in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.1.2)
Requirement already satisfied, skipping upgrade: pyswisseph in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (2.8.0.post1)
Requirement already satisfied, skipping upgrade: pytz in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (2020.1)
Requirement already satisfied, skipping upgrade: sanskrit_data in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (0.4.9)
Requirement already satisfied, skipping upgrade: scipy in /usr/local/lib/python3.8/dist-packages (from jyotisha==0.1.1) (1.5.2)
Requirement already satisfied, skipping upgrade: click>=5.1 in /usr/lib/python3/dist-packages (from flask->jyotisha==0.1.1) (7.0)
Requirement already satisfied, skipping upgrade: Jinja2>=2.10.1 in /usr/lib/python3/dist-packages (from flask->jyotisha==0.1.1) (2.10.1)
Requirement already satisfied, skipping upgrade: Werkzeug>=0.15 in /usr/local/lib/python3.8/dist-packages (from flask->jyotisha==0.1.1) (1.0.1)
Requirement already satisfied, skipping upgrade: itsdangerous>=0.24 in /usr/local/lib/python3.8/dist-packages (from flask->jyotisha==0.1.1) (1.1.0)
Requirement already satisfied, skipping upgrade: Six in /usr/lib/python3/dist-packages (from flask_cors->jyotisha==0.1.1) (1.14.0)
Requirement already satisfied, skipping upgrade: jsonschema in /usr/lib/python3/dist-packages (from flask_restplus->jyotisha==0.1.1) (3.2.0)
Requirement already satisfied, skipping upgrade: aniso8601>=0.82 in /usr/local/lib/python3.8/dist-packages (from flask_restplus->jyotisha==0.1.1) (8.0.0)
Requirement already satisfied, skipping upgrade: future in /usr/local/lib/python3.8/dist-packages (from geocoder->jyotisha==0.1.1) (0.18.2)
Requirement already satisfied, skipping upgrade: ratelim in /usr/local/lib/python3.8/dist-packages (from geocoder->jyotisha==0.1.1) (0.1.6)
Requirement already satisfied, skipping upgrade: requests in /usr/lib/python3/dist-packages (from geocoder->jyotisha==0.1.1) (2.22.0)
Requirement already satisfied, skipping upgrade: geographiclib<2,>=1.49 in /usr/local/lib/python3.8/dist-packages (from geopy->jyotisha==0.1.1) (1.50)
Requirement already satisfied, skipping upgrade: python-dateutil in /usr/local/lib/python3.8/dist-packages (from icalendar->jyotisha==0.1.1) (2.8.1)
Requirement already satisfied, skipping upgrade: selenium in /usr/local/lib/python3.8/dist-packages (from indic_transliteration->jyotisha==0.1.1) (3.141.0)
Requirement already satisfied, skipping upgrade: regex in /usr/local/lib/python3.8/dist-packages (from indic_transliteration->jyotisha==0.1.1) (2020.7.14)
Requirement already satisfied, skipping upgrade: backports.functools-lru-cache in /usr/local/lib/python3.8/dist-packages (from indic_transliteration->jyotisha==0.1.1) (1.6.1)
Requirement already satisfied, skipping upgrade: importlib-metadata in /usr/lib/python3/dist-packages (from jsonpickle->jyotisha==0.1.1) (1.5.0)
Requirement already satisfied, skipping upgrade: bcrypt in /usr/local/lib/python3.8/dist-packages (from sanskrit_data->jyotisha==0.1.1) (3.2.0)
Requirement already satisfied, skipping upgrade: yurl in /usr/local/lib/python3.8/dist-packages (from sanskrit_data->jyotisha==0.1.1) (1.0.0)
Requirement already satisfied, skipping upgrade: pymongo in /usr/local/lib/python3.8/dist-packages (from sanskrit_data->jyotisha==0.1.1) (3.11.0)
Requirement already satisfied, skipping upgrade: cloudant in /usr/local/lib/python3.8/dist-packages (from sanskrit_data->jyotisha==0.1.1) (2.14.0)
Requirement already satisfied, skipping upgrade: decorator in /usr/local/lib/python3.8/dist-packages (from ratelim->geocoder->jyotisha==0.1.1) (4.4.2)
Requirement already satisfied, skipping upgrade: urllib3 in /usr/lib/python3/dist-packages (from selenium->indic_transliteration->jyotisha==0.1.1) (1.25.8)
Requirement already satisfied, skipping upgrade: cffi>=1.1 in /usr/local/lib/python3.8/dist-packages (from bcrypt->sanskrit_data->jyotisha==0.1.1) (1.14.2)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.1->bcrypt->sanskrit_data->jyotisha==0.1.1) (2.20)
Building wheels for collected packages: jyotisha
Building wheel for jyotisha (setup.py) ... done
Created wheel for jyotisha: filename=jyotisha-0.1.1-py3-none-any.whl size=1697107 sha256=f951c5fda7ccccf23ea76ad3f92695fe73979209442e8dd1bd24075b3f7d50f8
Stored in directory: /tmp/pip-ephem-wheel-cache-pun_9r44/wheels/29/ce/6a/98a9029fb2eccf48300da7fed84779230e1da1a2431290d412
Successfully built jyotisha
Installing collected packages: jyotisha
Successfully installed jyotisha-0.1.1

vamsi@MSI:/panchang/panchangam-master/panchangam-master/bin$ ls /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/data/
ls: cannot access '/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/data/': No such file or directory
vamsi@MSI:
/panchang/panchangam-master/panchangam-master/bin$ ls /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/
init.py pycache migrator.py

Still the same problem persists. It looks like sub-module adyatithi is not getting downloaded.

vamsi@MSI:/panchang/panchangam-master/panchangam-master/bin$ python3 -m jyotisha.panchangam.scripts.write_daily_panchangam_tex Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2017 devanagari 'hh:mm' lagna
DEBUG: 2020-09-12 06:20:42,337 {common.py:873}: {'DataSource': <class 'sanskrit_data.schema.common.DataSource'>, 'JsonObject': <class 'sanskrit_data.schema.common.JsonObject'>, 'JsonObjectNode': <class 'sanskrit_data.schema.common.JsonObjectNode'>, 'NamedEntity': <class 'sanskrit_data.schema.common.NamedEntity'>, 'SchemaError': <class 'jsonschema.exceptions.SchemaError'>, 'ScriptRendering': <class 'sanskrit_data.schema.common.ScriptRendering'>, 'Target': <class 'sanskrit_data.schema.common.Target'>, 'TargetValidationError': <class 'sanskrit_data.schema.common.TargetValidationError'>, 'Text': <class 'sanskrit_data.schema.common.Text'>, 'UllekhanamJsonObject': <class 'sanskrit_data.schema.common.UllekhanamJsonObject'>, 'ValidationError': <class 'jsonschema.exceptions.ValidationError'>}
Loaded pre-computed panchangam from /home/vamsi/Documents/Chennai-2017.json.
WARNING: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)" [astropy._erfa.core]
WARNING: 2020-09-12 06:20:43,416 {logger.py:204}: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)"
WARNING: 2020-09-12 06:20:44,116 {periodical.py:1747}: Rare issue. No tithi 18 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,117 {periodical.py:1747}: Rare issue. No tithi 19 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,117 {periodical.py:1747}: Rare issue. No tithi 20 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,120 {periodical.py:1747}: Rare issue. No tithi 21 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,121 {periodical.py:1747}: Rare issue. No tithi 22 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,121 {periodical.py:1747}: Rare issue. No tithi 23 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,122 {periodical.py:1747}: Rare issue. No tithi 24 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,122 {periodical.py:1747}: Rare issue. No tithi 25 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,123 {periodical.py:1747}: Rare issue. No tithi 26 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,124 {periodical.py:1747}: Rare issue. No tithi 27 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 06:20:44,127 {periodical.py:1747}: Rare issue. No tithi 28 in this solar month (9). Therefore use lunar tithi.
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_tex.py", line 299, in
main()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_tex.py", line 291, in main
panchangam.update_festival_details()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/spatio_temporal/periodical.py", line 1945, in update_festival_details
self.compute_festivals()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/spatio_temporal/periodical.py", line 1376, in compute_festivals
festival_rules = read_old_festival_rules_dict(os.path.join(CODE_ROOT, 'panchangam/temporal/festival/data/legacy/festival_rules.json'))
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/init.py", line 581, in read_old_festival_rules_dict
with open(file_name, encoding="utf-8") as festivals_data:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/data/legacy/festival_rules.json'
vamsi@MSI:
/panchang/panchangam-master/panchangam-master/bin$

I tried downloading codes separately, i.e jyotisha-master.zip and adyatithi.zip, when unziped found that adyatithi.zip has needed festival.json files, and copied (festival*.json and dependencies), so that python errors can be removed and it worked.

Following are the directories copied
vamsi@MSI:/panchang$ sudo cp -rf adyatithi-f221096800398a43ee47f2cb20530a7efcf80922/data/ /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/
vamsi@MSI:
/panchang$ sudo cp -rf adyatithi-f221096800398a43ee47f2cb20530a7efcf80922/images/ /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/
vamsi@MSI:/panchang$ sudo cp -rf adyatithi-f221096800398a43ee47f2cb20530a7efcf80922/legacy/ /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/
vamsi@MSI:
/panchang$ sudo cp -rf /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/legacy /usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/temporal/festival/dat
a/

@vamsisvkrishna
Copy link

one more issue that I observed while generating ics files is following, just updated, so that it might help fixing bugs:

python3 -m jyotisha.panchangam.scripts.write_daily_panchangam_ics Hyderabad 17:23:2 78:27:22 'Asia/Calcutta' 2020 devanagari hh:mm:ss mini > VAMSI_TEST_2020_HYD_ICS
DEBUG: 2020-09-12 07:24:33,383 {common.py:873}: {'DataSource': <class 'sanskrit_data.schema.common.DataSource'>, 'JsonObject': <class 'sanskrit_data.schema.common.JsonObject'>, 'JsonObjectNode': <class 'sanskrit_data.schema.common.JsonObjectNode'>, 'NamedEntity': <class 'sanskrit_data.schema.common.NamedEntity'>, 'SchemaError': <class 'jsonschema.exceptions.SchemaError'>, 'ScriptRendering': <class 'sanskrit_data.schema.common.ScriptRendering'>, 'Target': <class 'sanskrit_data.schema.common.Target'>, 'TargetValidationError': <class 'sanskrit_data.schema.common.TargetValidationError'>, 'Text': <class 'sanskrit_data.schema.common.Text'>, 'UllekhanamJsonObject': <class 'sanskrit_data.schema.common.UllekhanamJsonObject'>, 'ValidationError': <class 'jsonschema.exceptions.ValidationError'>}
Loaded pre-computed panchangam from /home/vamsi/Documents/Hyderabad-2020.json.
WARNING: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)" [astropy._erfa.core]
WARNING: 2020-09-12 07:24:34,352 {logger.py:204}: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)"
WARNING: 2020-09-12 07:24:35,000 {periodical.py:1747}: Rare issue. No tithi 1 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,000 {periodical.py:1747}: Rare issue. No tithi 21 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,001 {periodical.py:1747}: Rare issue. No tithi 22 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,002 {periodical.py:1747}: Rare issue. No tithi 23 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,002 {periodical.py:1747}: Rare issue. No tithi 24 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,003 {periodical.py:1747}: Rare issue. No tithi 25 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,003 {periodical.py:1747}: Rare issue. No tithi 26 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,004 {periodical.py:1747}: Rare issue. No tithi 27 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,004 {periodical.py:1747}: Rare issue. No tithi 28 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,005 {periodical.py:1747}: Rare issue. No tithi 29 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:35,006 {periodical.py:1747}: Rare issue. No tithi 30 in this solar month (9). Therefore use lunar tithi.
WARNING: 2020-09-12 07:24:36,718 {periodical.py:341}: ta:appUdiyaDigaL nAyan2Ar (24) gurupUjai occurring on two consecutive days (27, 28). Removing! paraviddha assigned twice?
DEBUG: 2020-09-12 07:24:38,237 {periodical.py:1168}: ([27, 27, 27, 27], 1)
WARNING: 2020-09-12 07:24:38,238 {periodical.py:1169}: Could not assign paraviddha day for ta:rudrapazupati nAyan2Ar (16) gurupUjai! Please check for unusual cases.
DEBUG: 2020-09-12 07:24:38,867 {periodical.py:722}: * 2020-02-23> vyatIpAta-yOgaH (alabhyam)!
WARNING: 2020-09-12 07:24:39,047 {periodical.py:1349}: Removing mahA
kArttikI (334) since it does not coincide with tripurOtsavaH (335)
ERROR: 2020-09-12 07:24:39,048 {periodical.py:1412}: Relative festival zayana-EkAdazI not in fest_days!
ERROR: 2020-09-12 07:24:39,048 {periodical.py:1412}: Relative festival mArgazIrSa-aSTakA-zrAddham not in fest_days!
ERROR: 2020-09-12 07:24:39,049 {periodical.py:1412}: Relative festival mArgazIrSa-aSTakA-zrAddham not in fest_days!
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_ics.py", line 419, in
main()
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_ics.py", line 414, in main
write_to_file(ics_calendar, output_file)
File "/usr/local/lib/python3.8/dist-packages/jyotisha/panchangam/scripts/write_daily_panchangam_ics.py", line 95, in write_to_file
ics_calendar_file = open(fname, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: '../ics/daily/Ḥyderabad-2020-devanagari-daily.ics'

@vvasuki
Copy link
Contributor

vvasuki commented Sep 12, 2020

Following up on the installation issue at #46

@vvasuki
Copy link
Contributor

vvasuki commented Sep 12, 2020

one more issue that I observed while generating ics files is following, just updated, so that it might help fixing bugs:

advice you to create a new issue for that. (PS: fixes via PRs are welcome too)

@vamsisvkrishna
Copy link

Thanks a ton.
pip install git+https://github.com/sanskrit-coders/jyotisha/@master --target=./test_installation.local -U
This command worked and got all files in place.

@vvasuki
Copy link
Contributor

vvasuki commented Sep 12, 2020

you don't need --target=./test_installation.local - that was just for debugging.

@vamsisvkrishna
Copy link

yes, "sudo pip3 install git+https://github.com/sanskrit-coders/jyotisha/@master -U" this command worked and all files are present.

@bhagavansprasad
Copy link

Hi
Can you please help me in resolving the issue. I am doing below steps

git clone https://github.com/karthikraman/panchangam.git
cd panchangam/bin/
sudo pip3 install git+https://github.com/sanskrit-coders/jyotisha@master -U
./gen_daily_cal.sh Chennai 13:05:24 80:16:12 'Asia/Calcutta' 2017 devanagari lagna

But I am getting below error

DEBUG: 2021-01-23 08:32:51,304 {common.py:898}: {'DataSource': <class 'sanskrit_data.schema.common.DataSource'>, 'JsonObject': <class 'sanskrit_data.schema.common.JsonObject'>, 'JsonObjectNode': <class 'sanskrit_data.schema.common.JsonObjectNode'>, 'NamedEntity': <class 'sanskrit_data.schema.common.NamedEntity'>, 'SchemaError': <class 'jsonschema.exceptions.SchemaError'>, 'ScriptRendering': <class 'sanskrit_data.schema.common.ScriptRendering'>, 'Target': <class 'sanskrit_data.schema.common.Target'>, 'TargetValidationError': <class 'sanskrit_data.schema.common.TargetValidationError'>, 'Text': <class 'sanskrit_data.schema.common.Text'>, 'UllekhanamJsonObject': <class 'sanskrit_data.schema.common.UllekhanamJsonObject'>, 'ValidationError': <class 'jsonschema.exceptions.ValidationError'>}
/usr/bin/python3: No module named jyotisha.panchaanga.writer.tex.write_daily_panchaanga_tex
error!

@karthikraman
Copy link
Contributor

Pls check out the jyotisha project --- this project is currently defunct, but I hope to update it soon with just some pre-generated PDFs.... Do share your location of interest if you wish.

@baskar-yahoo
Copy link

baskar-yahoo commented Jan 24, 2021 via email

@ADITEYA333
Copy link

getting error code PEP 517 in installing
pip install git+https://github.com/sanskrit-coders/jyotisha@master -U


ERROR: Failed building wheel for jyotisha
Failed to build jyotisha
ERROR: Could not build wheels for jyotisha which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.2.1; however, version 21.2.4 is available.
You should consider upgrading via the 'c:\users\asus\appdata\local\programs\python\python38\python.exe -m pip install --upgrade pip' command.
Traceback (most recent call last):
File "c:\users\asus\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\asus\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
Untitled1

@Nithyaravi88
Copy link

Hi, How to get pdf in tamil format

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

9 participants