jyotisham / jyotisha

Python tools for the astronomical / astrological vedAnga of Hindus
MIT License
88 stars 52 forks source link

pip install fails #135

Closed dshetyo closed 6 days ago

dshetyo commented 1 year ago

Hello Sir, Thanks for this awesome project. I want to use ur project but am unable to install the same. Can u plz help?

!pip install git+https://github.com/jyotisham/jyotisha/@master -U !pip install jyotisha -U

Am using python 3.9

I have also tried installing from pypi. Thanks in advance

WARNING:2023-01-24 19:45:23,189:solar:334 No Garbhottam end found in this panchaanga interval!
DEBUG:2023-01-24 19:45:23,199:solar:396 No padmaka-yOgaH-1 involving KARANA 22 + YOGA 17 in span ?: (2021-05-23 05:45:37.160718+05:30, 2021-05-23 18:25:50.623387+05:30)!
WARNING:2023-01-24 19:45:23,273:__init__:81 Removing mahA~kArttikI ({datetime.datetime(2021, 11, 18, 0, 0)}) since it does not coincide with tripurOtsavaH ({datetime.datetime(2021, 11, 19, 0, 0)})
WARNING:2023-01-24 19:45:23,274:__init__:93 pancha-parva-4 on both days 130 and 131! Deleted 130
DEBUG:2023-01-24 19:45:23,280:__init__:70 Festival nirmalena_k2-jayaH is only in the future!
DEBUG:2023-01-24 19:45:23,280:__init__:70 Festival nirmalena_k2-jayaH is only in the future!
INFO:2023-01-24 19:45:23,283:annual:111 Writing computed panchaanga to /Users/dshetyo/Documents/jyotisha/Chennai__gregorian_2021__MULTI_NEW_MOON_SIDEREAL_MONTH_ADHIKA__CHITRA_AT_180.json...

TypeError                                 Traceback (most recent call last)
File ~/venv/python3.9/lib/python3.9/site-packages/IPython/core/formatters.py:706, in PlainTextFormatter.__call__(self, obj)
    699 stream = StringIO()
    700 printer = pretty.RepresentationPrinter(stream, self.verbose,
    701     self.max_width, self.newline,
    702     max_seq_length=self.max_seq_length,
    703     singleton_pprinters=self.singleton_printers,
    704     type_pprinters=self.type_printers,
    705     deferred_pprinters=self.deferred_printers)
--> 706 printer.pretty(obj)
    707 printer.flush()
    708 return stream.getvalue()

File ~/venv/python3.9/lib/python3.9/site-packages/IPython/lib/pretty.py:410, in RepresentationPrinter.pretty(self, obj)
    407                         return meth(obj, self, cycle)
    408                 if cls is not object \
    409                         and callable(cls.__dict__.get('__repr__')):
--> 410                     return _repr_pprint(obj, self, cycle)
    412     return _default_pprint(obj, self, cycle)
    413 finally:

File ~/venv/python3.9/lib/python3.9/site-packages/IPython/lib/pretty.py:778, in _repr_pprint(obj, p, cycle)
    776 """A pprint that just redirects to the normal repr function."""
    777 # Find newlines and replace them with p.break_()
--> 778 output = repr(obj)
    779 lines = output.splitlines()
    780 with p.group():

File ~/venv/python3.9/lib/python3.9/site-packages/sanskrit_data/schema/common.py:262, in JsonObject.__repr__(self)
    260 def __repr__(self):
    261   # __str__ falls back to this, and this is used in printing lists.
--> 262   return self.to_string(format="json")

File ~/venv/python3.9/lib/python3.9/site-packages/sanskrit_data/schema/common.py:256, in JsonObject.to_string(self, format, floating_point_precision, sort_keys)
    254 json_map = self.to_json_map(floating_point_precision=floating_point_precision)
    255 if format == "json":
--> 256   return json.dumps(json_map, sort_keys=sort_keys, ensure_ascii=False, indent=2)
    257 else:
    258   return toml.dumps(json_map, encoder=MultilinePreferringTomlEncoder())

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py:234, in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
    232 if cls is None:
    233     cls = JSONEncoder
--> 234 return cls(
    235     skipkeys=skipkeys, ensure_ascii=ensure_ascii,
    236     check_circular=check_circular, allow_nan=allow_nan, indent=indent,
    237     separators=separators, default=default, sort_keys=sort_keys,
    238     **kw).encode(obj)

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py:201, in JSONEncoder.encode(self, o)
    199 chunks = self.iterencode(o, _one_shot=True)
    200 if not isinstance(chunks, (list, tuple)):
--> 201     chunks = list(chunks)
    202 return ''.join(chunks)

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py:431, in _make_iterencode.<locals>._iterencode(o, _current_indent_level)
    429     yield from _iterencode_list(o, _current_indent_level)
    430 elif isinstance(o, dict):
--> 431     yield from _iterencode_dict(o, _current_indent_level)
    432 else:
    433     if markers is not None:

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py:405, in _make_iterencode.<locals>._iterencode_dict(dct, _current_indent_level)
    403         else:
    404             chunks = _iterencode(value, _current_indent_level)
--> 405         yield from chunks
    406 if newline_indent is not None:
    407     _current_indent_level -= 1

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py:405, in _make_iterencode.<locals>._iterencode_dict(dct, _current_indent_level)
    403         else:
    404             chunks = _iterencode(value, _current_indent_level)
--> 405         yield from chunks
    406 if newline_indent is not None:
    407     _current_indent_level -= 1

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py:438, in _make_iterencode.<locals>._iterencode(o, _current_indent_level)
    436         raise ValueError("Circular reference detected")
    437     markers[markerid] = o
--> 438 o = _default(o)
    439 yield from _iterencode(o, _current_indent_level)
    440 if markers is not None:

File /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py:179, in JSONEncoder.default(self, o)
    160 def default(self, o):
    161     """Implement this method in a subclass such that it returns
    162     a serializable object for ``o``, or calls the base implementation
    163     (to raise a ``TypeError``).
   (...)
    177 
    178     """
--> 179     raise TypeError(f'Object of type {o.__class__.__name__} '
    180                     f'is not JSON serializable')

TypeError: Object of type set is not JSON serializable
vvasuki commented 1 year ago

नमस्ते - I don't understand what's causing this. https://github.com/jyotisham/jyotisha/actions indicates that fresh installs and tests work fine. Please show the python code/ command leading to this output. You may find the tests a useful reference.

code4passion commented 1 month ago

Installed again. Works now