pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.6k stars 406 forks source link

Unable to launch Pyfa after most recent update #2404

Closed graysonhead closed 2 years ago

graysonhead commented 2 years ago

Bug Report

Hey there, I just upgraded to the latest version and installed new deps from the requirements.txt file in my virtualenv, and I now am unable to launch pyfa. I get the following traceback:

pyfa v2.39.3
EVE Data Version: 2000555 (2022-02-09 06:25:34)

OS version: Linux-5.16.8-100.fc34.x86_64-x86_64-with-glibc2.33
Python version: 3.9.10 (main, Jan 17 2022, 00:00:00) 
[GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]
wxPython version: 4.0.6 (wxWidgets 3.0.5)
SQLAlchemy version: 1.3.23
Logbook version: 1.5.3
Requests version: 2.25.1
Dateutil version: 2.8.1

####################

Traceback (most recent call last):
  File "/home/grayson/eve_tools/Pyfa/./pyfa.py", line 148, in <module>
    from gui.mainFrame import MainFrame
  File "/home/grayson/eve_tools/Pyfa/gui/mainFrame.py", line 36, in <module>
    import gui.fitCommands as cmd
  File "/home/grayson/eve_tools/Pyfa/gui/fitCommands/__init__.py", line 1, in <module>
    from .gui.booster.add import GuiAddBoosterCommand
  File "/home/grayson/eve_tools/Pyfa/gui/fitCommands/gui/booster/add.py", line 6, in <module>
    from gui.fitCommands.calc.booster.add import CalcAddBoosterCommand
  File "/home/grayson/eve_tools/Pyfa/gui/fitCommands/calc/booster/add.py", line 4, in <module>
    from service.fit import Fit
  File "/home/grayson/eve_tools/Pyfa/service/fit.py", line 35, in <module>
    from service.character import Character
  File "/home/grayson/eve_tools/Pyfa/service/character.py", line 36, in <module>
    from service.esi import Esi
  File "/home/grayson/eve_tools/Pyfa/service/esi.py", line 14, in <module>
    from service.esiAccess import APIException, GenericSsoError
  File "/home/grayson/eve_tools/Pyfa/service/esiAccess.py", line 20, in <module>
    from requests_cache import CachedSession
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/__init__.py", line 43, in <module>
    from .backends import *
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/backends/__init__.py", line 8, in <module>
    from .base import BaseCache, BaseStorage
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/backends/base.py", line 18, in <module>
    from ..serializers import init_serializer
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/serializers/__init__.py", line 6, in <module>
    from .preconf import (
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/serializers/preconf.py", line 26, in <module>
    base_stage = CattrStage()  #: Base stage for all serializer pipelines
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/serializers/cattrs.py", line 32, in __init__
    self.converter = init_converter(factory)
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/requests_cache/serializers/cattrs.py", line 67, in init_converter
    converter.register_structure_hook(
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/cattr/converters.py", line 263, in register_structure_hook
    self._structure_func.register_cls_list([(cl, func)])
  File "/home/grayson/eve_tools/Pyfa/venv/lib64/python3.9/site-packages/cattr/dispatch.py", line 57, in register_cls_list
    self._single_dispatch.register(cls, handler)
  File "/usr/lib64/python3.9/functools.py", line 855, in register
    raise TypeError(
TypeError: Invalid first argument to `register()`. ForwardRef('CachedResponse') is not a class.

Expected behavior:

Pyfa launches

Actual behavior:

Crash report with above error occurs

Detailed steps to reproduce:

clone pyfa repo create python 3 virtualenv install deps with pip install -r requirements.txt run pyfa

Release or development git branch? Please note the release version or commit hash:

v2.39.3

Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):

Fedora 34

let me know if there is any other information I can provide. Thanks for the software!

graysonhead commented 2 years ago

I was unable to recreate this with Python 3.7. The issue seems to be exclusive to Python 3.8

blitzmann commented 2 years ago

We only officially support python 3.7, I know there's various issues with other versions of python / wxpython. That being said, the error itself looks like it could be a library issue in the requests package.

I'm assuming you're back up and running by now since you mentioned it was working in 3.7. Additionally, were close to being able to package a linux binary build using AppImage, please see #2410. :)