ilius / starcal

StarCalendar: Full-featured International Calendar for Linux Desktop
https://ilius.github.io/starcal/
GNU Affero General Public License v3.0
153 stars 22 forks source link

ناسازگاری با پایتون ۳.۷ #48

Closed HassanHeydariNasab closed 5 years ago

HassanHeydariNasab commented 5 years ago

سلام.

چند روزی هست که برنامه اجرا نمی‌شود. پوشهٔ `starcal3./~` را پاک کردم ولی فرقی نکرد.

Distro: Manjaro 17.1.12 starcal3 Version: 3.0.7 master 089b834360692e4abaf7312f50797e26985e2d2b and also 3.0.6 installed from AUR

$ starcal3 

(starcal.py:10578): Gtk-WARNING **: 12:46:48.099: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(starcal.py:10578): Gtk-WARNING **: 12:46:48.099: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(starcal.py:10578): Gtk-WARNING **: 12:46:48.099: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
Traceback (most recent call last):
  File "/usr/share/starcal3/scal3/ui.py", line 362, in getCell
    return self.jdCells[jd]
KeyError: 2458356

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/starcal3/scal3/event_search_tree.py", line 165, in searchStep
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/share/starcal3/scal3/ui_gtk/starcal.py", line 1075, in <module>
    sys.exit(main())
  File "/usr/share/starcal3/scal3/ui_gtk/starcal.py", line 1053, in main
    ui.init()
  File "/usr/share/starcal3/scal3/ui.py", line 533, in init
    todayCell = cell = cellCache.getTodayCell() ## FIXME
  File "/usr/share/starcal3/scal3/ui.py", line 371, in <lambda>
    getTodayCell = lambda self: self.getCell(core.getCurrentJd())
  File "/usr/share/starcal3/scal3/ui.py", line 364, in getCell
    return self.buildCell(jd)
  File "/usr/share/starcal3/scal3/ui.py", line 373, in buildCell
    localCell = Cell(jd)
  File "/usr/share/starcal3/scal3/ui.py", line 310, in __init__
    self.eventsData = event_lib.getDayOccurrenceData(jd, eventGroups)## here? FIXME
  File "/usr/share/starcal3/scal3/event_lib.py", line 4156, in getDayOccurrenceData
    for epoch0, epoch1, eid, odt in group.occur.search(getEpochFromJd(curJd), getEpochFromJd(curJd+1)):
  File "/usr/share/starcal3/scal3/event_search_tree.py", line 185, in search
    for mt, dt, eid in self.searchStep(self.root, t0, t1):
RuntimeError: generator raised StopIteration
ilius commented 5 years ago

لطفاً دوباره تست کنید ممنون

HassanHeydariNasab commented 5 years ago

دوباره دقیقاً با خطای قبلی مواجه شدم.

ilius commented 5 years ago

لطفاً خروجی کامل ترمینال رو پیست کنید ممنون

HassanHeydariNasab commented 5 years ago
$ starcal3 

(starcal.py:3926): Gtk-WARNING **: 18:07:54.858: Theme parsing error: gtk.css:68:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version

(starcal.py:3926): Gtk-WARNING **: 18:07:54.858: Theme parsing error: gtk.css:69:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version

(starcal.py:3926): Gtk-WARNING **: 18:07:54.859: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
Traceback (most recent call last):
  File "/usr/share/starcal3/scal3/ui.py", line 362, in getCell
    return self.jdCells[jd]
KeyError: 2458357

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/starcal3/scal3/event_search_tree.py", line 165, in searchStep
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/share/starcal3/scal3/ui_gtk/starcal.py", line 1075, in <module>
    sys.exit(main())
  File "/usr/share/starcal3/scal3/ui_gtk/starcal.py", line 1053, in main
    ui.init()
  File "/usr/share/starcal3/scal3/ui.py", line 533, in init
    todayCell = cell = cellCache.getTodayCell() ## FIXME
  File "/usr/share/starcal3/scal3/ui.py", line 371, in <lambda>
    getTodayCell = lambda self: self.getCell(core.getCurrentJd())
  File "/usr/share/starcal3/scal3/ui.py", line 364, in getCell
    return self.buildCell(jd)
  File "/usr/share/starcal3/scal3/ui.py", line 373, in buildCell
    localCell = Cell(jd)
  File "/usr/share/starcal3/scal3/ui.py", line 310, in __init__
    self.eventsData = event_lib.getDayOccurrenceData(jd, eventGroups)## here? FIXME
  File "/usr/share/starcal3/scal3/event_lib.py", line 4156, in getDayOccurrenceData
    for epoch0, epoch1, eid, odt in group.occur.search(getEpochFromJd(curJd), getEpochFromJd(curJd+1)):
  File "/usr/share/starcal3/scal3/event_search_tree.py", line 186, in search
    for mt, dt, eid in self.searchStep(self.root, t0, t1):
RuntimeError: generator raised StopIteration
ilius commented 5 years ago

لطفاً دوباره تست کنید ببخشید امکان تست روی پایتون 3.7 رو نداشتم فعلاً

HassanHeydariNasab commented 5 years ago

حل نشد

ilius commented 5 years ago

لطفاً دوباره پول کنید و تست کنید ممنون

HassanHeydariNasab commented 5 years ago
$ ./install-archlinux 
==> Making package: starcal3 3.0.7_18_g63fc1b27-1 (Wed 29 Aug 2018 11:16:24 AM +0430)
==> Checking runtime dependencies...
==> Installing missing dependencies...
error: target not found: python<=3.6
==> ERROR: 'pacman' failed to install missing dependencies.
$ python
python             python2.7-config   python3.6          python3.6m-config  python3.7m         python-config
python2            python2-config     python3.6-config   python3.7          python3.7m-config  
python2.7          python3            python3.6m         python3.7-config   python3-config
$ whereis python
python: /usr/bin/python2.7 /usr/bin/python3.7m-config /usr/bin/python3.7-config /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python3.6-config /usr/bin/python2.7-config /usr/bin/python3.7m /usr/bin/python /usr/bin/python3.7 /usr/bin/python3.6m-config /usr/lib/python2.7 /usr/lib/python3.6 /usr/lib/python3.7 /usr/include/python2.7 /usr/include/python3.6m /usr/include/python3.7m /usr/include/python /usr/share/man/man1/python.1.gz
$ python
Python 3.7.0 (default, Jul 15 2018, 10:44:58) 
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
ilius commented 5 years ago

با این اسکریپت نصب کنید sudo ./install

HassanHeydariNasab commented 5 years ago

با چه آپشن‌هایی؟

ilius commented 5 years ago

بدون هیچ آپشنی در ضمن نسخهٔ نصب شده رو بهتره حذف کنید

HassanHeydariNasab commented 5 years ago

تنها چیزی که می‌بینم همینه و اتفاقی هم نیفتاد

$ sudo ./install
Using /bin/python3.6
HassanHeydariNasab commented 5 years ago

این کارها رو کردم و به درستی اجرا شد

yaourt -S python36
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3.6 get-pip.py
sudo pip3.6 install bson pymongo psutil gobject PyGObject
sudo ./install-archlinux
alihardan commented 5 years ago

سلام و تشکر. چرا این موضوع بسته شده؟ مشکل که حل نشده هنوز. تمامی کاربران پایتون 3.7 با این مشکل مواجه میشن. ‫امروز در آرچ‌لینوکس تلاش کردم از آخرین نسخه‌ی git نرم‌افزار شما رو نصب کنم. لٰکن:

[ali@ali-host starcal-master]$ ./install-archlinux
==> Making package: starcal3 3.0.7-1 (Thu 20 Sep 2018 01:09:09 AM +0430)
==> Checking runtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...

Packages (4) python-cairo-1.17.0-2.0  python-dateutil-2.7.3-2.0  python-httplib2-0.11.3-2.0
             python-pymongo-3.7.1-1.0

Total Installed Size:  4.22 MiB

:: Proceed with installation? [Y/n] 
(4/4) checking keys in keyring                                      [######################################] 100%
(4/4) checking package integrity                                    [######################################] 100%
(4/4) loading package files                                         [######################################] 100%
(4/4) checking for file conflicts                                   [######################################] 100%
(4/4) checking available disk space                                 [######################################] 100%
:: Processing package changes...
(1/4) installing python-cairo                                       [######################################] 100%
(2/4) installing python-httplib2                                    [######################################] 100%
(3/4) installing python-dateutil                                    [######################################] 100%
(4/4) installing python-pymongo                                     [######################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Entering fakeroot environment...
==> Starting package()...
which: no python3.6 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.5 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.4 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.3 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.2 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Only these python version are supported: 3.6 3.5 3.4 3.3 3.2
==> ERROR: A failure occurred in package().
    Aborting...

راه حلی که ارائه شده، راهِ حل نیست. می‌دونید که.

alihardan commented 5 years ago

‫و خروجیِ ‪./install

[ali@ali-host starcal-master]$ ./install
which: no python3.6 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.5 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.4 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.3 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
which: no python3.2 in (/home/ali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Only these python version are supported: 3.6 3.5 3.4 3.3 3.2
alihardan commented 5 years ago

‫با ویرایش فایل install مشکل حل شد. یک PR ثبت کردم. نرم‌افزار به خوبی اجرا شد و ظاهرا مشکلی نداره. ‫امّا فقط نسخه‌ی git به خوبی کار می‌کنه، نسخه‌ی 3.0.7 در پایتون 3.7 ارور میده و صفحه‌ی نرم‌افزار بالا نمیاد.

javadr commented 5 years ago

I have the same problem with Fedora 29 using python 3.7 as default. I modified install-fedora script by adding 7 to the minor list; Now, it works and there is no other issue. I wish you would have enough time to update your code.

ilius commented 5 years ago

Default version does not matter. You just need to install python36