tytkal / python-hijiri-ummalqura

MIT License
34 stars 17 forks source link

Import issue in python 3 #12

Closed azarezade closed 3 years ago

azarezade commented 6 years ago

When I try to:

from umalqurra.hijri_date import HijriDate

it throws the following exception:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2869, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-20-56379d572b91>", line 1, in <module>
    from umalqurra.hijri_date import HijriDate
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 20, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/umalqurra/hijri_date.py", line 10, in <module>
    from hijri import Umalqurra
  File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 20, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'hijri'
FahadAlbukhari commented 6 years ago

Me too 😔

azarezade commented 6 years ago

@FahadAlbukhari The problem is that the version of the package in https://pypi.org/project/ummalqura/#files is old and have issue, but the version is the GitHub is ok! Actually the problem is with relative imports in the hijri_date.py and hijri.py files. @tytkal could you please fix it.

FahadAlbukhari commented 6 years ago

Thank you, that what I figured out. I download the repo