I'm able to generate md & ics for Chennai. But when I tried to generate for town Mechanicsburg. I'm getting errors, before I try and fix them thought of reporting and get your feedback.
prior to running generation_project for Mechanicsburg, I made modifications to 2 files in my local environment.
generation_project/main.py to replace "Chennai" with "Mechanicsburg"
Added these two lines in places_lat_lon_tz_db.tsv
Mechanicsburg 40.214 -77.009 America/New_York
Ijamsville 39.360 -39.360 America/New_York
/home/cloud_user/test_installation.local/erfa/core.py:154: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)"
warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),
/home/cloud_user/test_installation.local/erfa/core.py:154: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)"
warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),
WARNING:2020-12-06 03:16:53,750:init:80 Removing mahA~kArttikI ({datetime.datetime(2098, 11, 8, 0, 0)}) since it does not coincide with tripurOtsavaH ({datetime.datetime(2098, 11, 10, 0, 0)})
ERROR:2020-12-06 03:16:53,753:init:39 Relative festival zayana-EkAdazI not in festival_id_to_days!
INFO:2020-12-06 03:16:53,782:annual:52 Writing computed panchaanga to /home/cloud_user/Documents/jyotisha/Mechanicsburgshaka_2020__MULTI_NEW_MOON_SIDEREAL_MONTH_ADHIKACHITRA_AT_180.json...
Traceback (most recent call last):
File "/home/cloud_user/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/cloud_user/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/generation_project/main.py", line 6, in
generation_project.dump_common(year=2020, city=Mechanicsburg)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/generation_project/init.py", line 32, in dump_common
dump_ics_md_pair(panchaanga=panchaanga, period_str=str(year))
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/generation_project/init.py", line 19, in dump_ics_md_pair
ics_calendar = ics.compute_calendar(panchaanga)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/ics/init.py", line 46, in compute_calendar
event = get_day_summary_event(d=day_index, panchaanga=panchaanga, script=scripts[0])
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/ics/day_details.py", line 52, in get_day_summary_event
(title, details) = day_summary(d=d, panchaanga=panchaanga, script=script)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/md/day_details.py", line 127, in day_summary
translate_and_transliterate('kSEtram', script), panchaanga.city.get_transliterated_name(script=script)),
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/spatio_temporal/init.py", line 99, in get_transliterated_name
return custom_transliteration.tr(self.name_hk, script)
File "/home/cloud_user/test_installation.local/jyotisha/custom_transliteration.py", line 38, in tr
t = text.replace('~', '##~##') # Simple fix to prevent transliteration of ~
AttributeError: 'float' object has no attribute 'replace'
You're working with obsolete code. (As deduced from translate_and_transliterate.) If you still get an error after updating, please fix, test and send a pull request
Hi,
I'm able to generate md & ics for Chennai. But when I tried to generate for town Mechanicsburg. I'm getting errors, before I try and fix them thought of reporting and get your feedback.
prior to running generation_project for Mechanicsburg, I made modifications to 2 files in my local environment.
python -m jyotisha.panchaanga.writer.generation_project DEBUG:2020-12-06 03:16:12,292:common: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'>} INFO:2020-12-06 03:16:12,940:annual:42 No precomputed data available. Computing panchaanga...
/home/cloud_user/test_installation.local/erfa/core.py:154: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)" warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg), /home/cloud_user/test_installation.local/erfa/core.py:154: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)" warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg), WARNING:2020-12-06 03:16:53,750:init:80 Removing mahA~kArttikI ({datetime.datetime(2098, 11, 8, 0, 0)}) since it does not coincide with tripurOtsavaH ({datetime.datetime(2098, 11, 10, 0, 0)}) ERROR:2020-12-06 03:16:53,753:init:39 Relative festival zayana-EkAdazI not in festival_id_to_days! INFO:2020-12-06 03:16:53,782:annual:52 Writing computed panchaanga to /home/cloud_user/Documents/jyotisha/Mechanicsburgshaka_2020__MULTI_NEW_MOON_SIDEREAL_MONTH_ADHIKACHITRA_AT_180.json...
Traceback (most recent call last): File "/home/cloud_user/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/cloud_user/.pyenv/versions/3.8.2/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/generation_project/main.py", line 6, in
generation_project.dump_common(year=2020, city=Mechanicsburg)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/generation_project/init.py", line 32, in dump_common
dump_ics_md_pair(panchaanga=panchaanga, period_str=str(year))
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/generation_project/init.py", line 19, in dump_ics_md_pair
ics_calendar = ics.compute_calendar(panchaanga)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/ics/init.py", line 46, in compute_calendar
event = get_day_summary_event(d=day_index, panchaanga=panchaanga, script=scripts[0])
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/ics/day_details.py", line 52, in get_day_summary_event
(title, details) = day_summary(d=d, panchaanga=panchaanga, script=script)
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/writer/md/day_details.py", line 127, in day_summary
translate_and_transliterate('kSEtram', script), panchaanga.city.get_transliterated_name(script=script)),
File "/home/cloud_user/test_installation.local/jyotisha/panchaanga/spatio_temporal/init.py", line 99, in get_transliterated_name
return custom_transliteration.tr(self.name_hk, script)
File "/home/cloud_user/test_installation.local/jyotisha/custom_transliteration.py", line 38, in tr
t = text.replace('~', '##~##') # Simple fix to prevent transliteration of ~
AttributeError: 'float' object has no attribute 'replace'