# Pyfa - The Python Fitting Assistant

**URL:** <https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156>\
**Category:** PvP Ships & Modules\
**Created:** [September 24, 2017, 9:48pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156 "2017-09-24T21:48:53Z")\
**Posts on this page:** 20\
**Page:** 20

<div class="post-metadata">

**Author:** ![Maiden\_Haste](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/maiden_haste/32/296150_2.png) [@Maiden\_Haste](https://forums.eveonline.com/u/Maiden_Haste)\
**Post date:** [January 24, 2022, 7:45pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/393 "2022-01-24T19:45:21Z")

</div>

Hey, long term user of PYFA and first time I have had any major issue.

It’s been a while since I updated my characters and attempted to re-do the esi as ususal:  
Editors \> Character \> Select character \> Click SSO login button.

But when I select my character on the Eve website, all I get is:  
" pyfa

Error! Server response not received.

The local pyfa server may have timed out, or may not have started correctly."

I turned off all firewalls etc that I have to see if it was my fault with no difference in the result.

What’s going on here?

---

<div class="post-metadata">

**Author:** ![Maiden\_Haste](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/maiden_haste/32/296150_2.png) [@Maiden\_Haste](https://forums.eveonline.com/u/Maiden_Haste)\
**Post date:** [January 31, 2022, 3:29pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/394 "2022-01-31T15:29:57Z")

</div>

Anyone? I have googled about and cannot find anything related to this yet I still cannot add characters to Pyfa.

I have created this post on the git repo:

> <https://github.com/pyfa-org/Pyfa/issues/2401>
>
> \## Bug Report
> I get an error when attempting to add characters to PYFA.
> The lo…cal pyfa server may have timed out, or may not have started correctly
> 
> !\[image\](https://user-images.githubusercontent.com/98760282/151825636-d8a6e12d-11d5-4e19-ba9b-6b3325043b9b.png)
> 
> 
> \### Expected behavior:
> \> Webpage transitions to a message related to closing the window
> \> Character is imported to Pyfa
> 
> \### Actual behavior:
> \> Webpage transitions to a page stating:
> "pyfa
> Error! Server response not received.
> The local pyfa server may have timed out, or may not have started correctly."
> \> PYFA application is still awaiting a reseponse.
> 
> \### Detailed steps to reproduce:
> 1. Open PYFA App
> 2. Click top menu button Editors
> 3. Click Character Editor from the drop down
> 4. Select an existing Character from the top dropdown in the Character Editor window
> 5. Click EVE SSO tab 
> 6. Click Log In with EVE SSO at the bottom of the screen
> 7. (Login to the Eve Website if needed) Click any character from the Character Selection webpage that has been present
> 8. Click the Authorize button
> 
> \### Fits involved in EFT format (Edit \> To Clipboard \> EFT):
> 
> 
> \### Release or development git branch? Please note the release version or commit hash:
> Release v2.39.2
> 
> \### Operating system and version (eg: Windows 10, OS X 10.9, OS X 10.11, Ubuntu 16.10):
> Win 10
> 
> \### Other relevant information:
> Software Anti-virus / firewall turned off for test.

---

<div class="post-metadata">

**Author:** ![Luscius\_Uta](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/luscius_uta/32/385796_2.png) [@Luscius\_Uta](https://forums.eveonline.com/u/Luscius_Uta)\
**Post date:** [February 14, 2022, 8:34am UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/395 "2022-02-14T08:34:50Z")

</div>

I got this message today after trying to authorize one of my characters in through ESO to update skills (other characters were authorized without errors):

> pyfa v2.39.3  
> EVE Data Version: 2000555 (2022-02-09 13:25:34)
> 
> OS version: Windows-10-10.0.19041-SP0  
> Python version: 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]  
> wxPython version: 4.0.6 (wxWidgets 3.0.5)  
> SQLAlchemy version: 1.3.23  
> Logbook version: 1.5.3  
> Requests version: 2.27.1  
> Dateutil version: 2.8.2
> 
> ####################
> 
> Traceback (most recent call last):  
> File “gui\characterEditor.py”, line 836, in ssoListChanged  
> File “gui\characterEditor.py”, line 848, in charChanged  
> File “site-packages\sqlalchemy\orm\attributes.py”, line 294, in **get**  
> File “site-packages\sqlalchemy\orm\attributes.py”, line 725, in get  
> File “site-packages\sqlalchemy\orm\state.py”, line 652, in \_load\_expired  
> File “site-packages\sqlalchemy\orm\loading.py”, line 1010, in load\_scalar\_attributes  
> File “site-packages\sqlalchemy\orm\loading.py”, line 206, in load\_on\_ident  
> File “site-packages\sqlalchemy\orm\loading.py”, line 286, in load\_on\_pk\_identity  
> File “site-packages\sqlalchemy\orm\query.py”, line 3490, in one  
> File “site-packages\sqlalchemy\orm\query.py”, line 3459, in one\_or\_none  
> File “site-packages\sqlalchemy\orm\query.py”, line 3535, in **iter**  
> File “site-packages\sqlalchemy\orm\query.py”, line 3557, in \_execute\_and\_instances  
> File “site-packages\sqlalchemy\orm\query.py”, line 3572, in \_get\_bind\_args  
> File “site-packages\sqlalchemy\orm\query.py”, line 3550, in \_connection\_from\_session  
> File “site-packages\sqlalchemy\orm\session.py”, line 1145, in connection  
> File “site-packages\sqlalchemy\orm\session.py”, line 1151, in \_connection\_for\_bind  
> File “site-packages\sqlalchemy\orm\session.py”, line 440, in \_connection\_for\_bind  
> AttributeError: ‘NoneType’ object has no attribute ‘twophase’

---

<div class="post-metadata">

**Author:** ![Pandoralica](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/pandoralica/32/374133_2.png) [@Pandoralica](https://forums.eveonline.com/u/Pandoralica)\
**Post date:** [March 12, 2022, 5:01pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/396 "2022-03-12T17:01:13Z")

</div>

Hey, any chance we can get Drone EHP to show in pyfa? :\>

---

<div class="post-metadata">

**Author:** ![TiberianSun371AlexW](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/tiberiansun371alexw/32/510819_2.png) [@TiberianSun371AlexW](https://forums.eveonline.com/u/TiberianSun371AlexW)\
**Post date:** [March 15, 2022, 10:02pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/397 "2022-03-15T22:02:57Z")

</div>

Thank you, it took me forever to find this. I kept left clicking the cargo tab

---

<div class="post-metadata">

**Author:** ![Mayer\_A\_Rothschild](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/mayer_a_rothschild/32/472736_2.png) [@Mayer\_A\_Rothschild](https://forums.eveonline.com/u/Mayer_A_Rothschild)\
**Post date:** [March 16, 2022, 5:39pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/398 "2022-03-16T17:39:29Z")

</div>

Can somebody PLEASE make a dark theme for this app.  
I’m going blind with all that white.

---

<div class="post-metadata">

**Author:** ![Emotional\_Support\_Clown](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/emotional_support_clown/32/310422_2.png) [@Emotional\_Support\_Clown](https://forums.eveonline.com/u/Emotional_Support_Clown)\
**Post date:** [March 16, 2022, 6:07pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/399 "2022-03-16T18:07:31Z")

</div>

> [@Mayer\_A\_Rothschild](#):
>
> Can somebody PLEASE make a dark theme for this app.

Could somebody please rewrite this app in _Go_ or something more compiled and performant and less ugly?

---

<div class="post-metadata">

**Author:** ![Emotional\_Support\_Clown](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/emotional_support_clown/32/310422_2.png) [@Emotional\_Support\_Clown](https://forums.eveonline.com/u/Emotional_Support_Clown)\
**Post date:** [March 17, 2022, 9:54pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/400 "2022-03-17T21:54:37Z")

</div>

> [@Mayer\_A\_Rothschild](#):
>
> Can somebody PLEASE make a dark theme for this app.

Issue tracked here [[Request] Dark/Nightmode · Issue #1206 · pyfa-org/Pyfa · GitHub](https://github.com/pyfa-org/Pyfa/issues/1206)

Pull request here [Added initial dark mode settings by mccloudy · Pull Request #2175 · pyfa-org/Pyfa · GitHub](https://github.com/pyfa-org/Pyfa/pull/2175)

---

<div class="post-metadata">

**Author:** ![Nemalia](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/nemalia/32/313812_2.png) [@Nemalia](https://forums.eveonline.com/u/Nemalia)\
**Post date:** [March 28, 2022, 5:08pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/401 "2022-03-28T17:08:14Z")

</div>

Cannot connect my character

![image](https://global.discourse-cdn.com/eveonline/original/4X/d/f/6/df64955375595233910513b6e21651657f7029a7.png)

---

<div class="post-metadata">

**Author:** ![Emotional\_Support\_Clown](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/emotional_support_clown/32/310422_2.png) [@Emotional\_Support\_Clown](https://forums.eveonline.com/u/Emotional_Support_Clown)\
**Post date:** [March 28, 2022, 5:11pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/402 "2022-03-28T17:11:52Z")

</div>

Issue tracker here → [Issues · pyfa-org/Pyfa · GitHub](https://github.com/pyfa-org/Pyfa/issues)

This is the code that throws that exception

File → service/esiAccess.py

```auto
   def validate_eve_jwt(self, jwt_token):
        """Validate a JWT token retrieved from the EVE SSO.
        Args:
            jwt_token: A JWT token originating from the EVE SSO
        Returns
            dict: The contents of the validated JWT token if there are no
                  validation errors
        """

        try:
            jwk_sets = self.jwks["keys"]
        except KeyError as e:
            raise GenericSsoError("Something went wrong when retrieving the JWK set. The returned "
                  "payload did not have the expected key {}. \nPayload returned "
                  "from the SSO looks like: {}".format(e, self.jwks))

        jwk_set = next((item for item in jwk_sets if item["alg"] == "RS256"))

        try:
            return jwt.decode(
                jwt_token,
                jwk_set,
                algorithms=jwk_set["alg"],
                issuer=[self.server_base.sso, "https://%s" % self.server_base.sso]
            )
        except ExpiredSignatureError as e:
            raise GenericSsoError("The JWT token has expired: {}".format(str(e)))
        except JWTError as e:
            raise GenericSsoError("The JWT signature was invalid: {}".format(str(e)))
        except JWTClaimsError as e:
            raise GenericSsoError("The issuer claim was not from login.eveonline.com or "
                "https://login.eveonline.com: {}".format(str(e)))

```

The RFC on JWT audience claim is [RFC 7519: JSON Web Token (JWT)](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.3)

Issue is tracked here [Can't add character: "The JWT signature was invalid: Invalid audience" · Issue #2421 · pyfa-org/Pyfa · GitHub](https://github.com/pyfa-org/Pyfa/issues/2421)

Pull request for fix is here [Skip validation of JWT "aud" claim by nmalaguti · Pull Request #2422 · pyfa-org/Pyfa · GitHub](https://github.com/pyfa-org/Pyfa/pull/2422)

Seems CCP added “aud” claim to the token

---

<div class="post-metadata">

**Author:** ![Emotional\_Support\_Clown](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/emotional_support_clown/32/310422_2.png) [@Emotional\_Support\_Clown](https://forums.eveonline.com/u/Emotional_Support_Clown)\
**Post date:** [April 16, 2022, 5:01pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/403 "2022-04-16T17:01:15Z")

</div>

Might want to clone PyFa repository locally just in case, Github is on a banhammer rampage.

```auto
git clone https://github.com/pyfa-org/Pyfa.git

```

---

<div class="post-metadata">

**Author:** ![MajorBean](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/majorbean/32/382916_2.png) [@MajorBean](https://forums.eveonline.com/u/MajorBean)\
**Post date:** [April 25, 2022, 1:59pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/404 "2022-04-25T13:59:58Z")

</div>

I cant add a character, what am i doing wrong?  
 ![Unbenannt](https://global.discourse-cdn.com/eveonline/original/4X/1/f/c/1fc0a56639ab039bd1c0764382d7f6f16c8900f1.jpeg)

---

<div class="post-metadata">

**Author:** ![Ambushing\_Shartress](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/ambushing_shartress/32/383191_2.png) [@Ambushing\_Shartress](https://forums.eveonline.com/u/Ambushing_Shartress)\
**Post date:** [May 31, 2022, 8:01pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/405 "2022-05-31T20:01:20Z")

</div>

Got an error it said to share with you. Cheers.

pyfa v2.43.0  
EVE Data Version: 2040917 (2022-05-05 06:28:05)

OS version: Windows-10-10.0.22000-SP0  
Python version: 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]  
wxPython version: 4.0.6 (wxWidgets 3.0.5)  
SQLAlchemy version: 1.3.23  
Logbook version: 1.5.3  
Requests version: 2.27.1  
Dateutil version: 2.8.2

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

Traceback (most recent call last):  
File “gui\builtinViews\fittingView.py”, line 607, in fitChanged  
File “gui\builtinViews\fittingView.py”, line 556, in generateMods  
File “gui\builtinViews\fittingView.py”, line 556, in   
ValueError: None is not in list

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

Traceback (most recent call last):  
File “gui\statsPane.py”, line 79, in fitChanged  
File “gui\builtinStatsViews\priceViewFull.py”, line 88, in refreshPanel  
File “service\price.py”, line 178, in getPrices  
File “service\market.py”, line 501, in getItem  
TypeError: Need Item object, integer, float or string as argument

pyfa v2.43.0  
EVE Data Version: 2040917 (2022-05-05 06:28:05)

OS version: Windows-10-10.0.22000-SP0  
Python version: 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]  
wxPython version: 4.0.6 (wxWidgets 3.0.5)  
SQLAlchemy version: 1.3.23  
Logbook version: 1.5.3  
Requests version: 2.27.1  
Dateutil version: 2.8.2

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

Traceback (most recent call last):  
File “gui\builtinViews\fittingView.py”, line 196, in OnMouseMove  
IndexError: list index out of range

---

<div class="post-metadata">

**Author:** ![Liquidor\_van\_Eekels](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/liquidor_van_eekels/32/321948_2.png) [@Liquidor\_van\_Eekels](https://forums.eveonline.com/u/Liquidor_van_Eekels)\
**Post date:** [June 8, 2022, 11:19pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/406 "2022-06-08T23:19:22Z")

</div>

I have a question about PyFa, hope this is the right place to ask it.

I’m trying to theorycraft over a Dominix fit I might want to use for FOBs. It has 3 remote cap transmitters and 3 remote armor repairers.

After fiddling around a bit I found out that you can ‘project’ the effects of incoming remote cap / armor rep, so I added the same fit I was working on as a ‘Projected’ effect 3 times (the idea is that me and 3 friends will be flying the exact same domi fits).

Now this obviously changes the stats PyFa shows, but how does it calculate this?  
Since all domi fits have 3 remote cap transmitters and 3 remote armor reps, will it:  
A: Calculate the stats as if all 3 other domi’s use all their 3 remote cap / armor reps on me (i.e. I’m receiving the effects of 9 remote cap transmitters and 9 remote armor reps)  
B: Calculate the stats as if each domi ‘splits’ their remote stuff over the 3 other domis (so I’m receiving the effects of 3 remote cap transmitters and 3 remote armor reps)

I’m assuming it’s A, but how could I use PyFa to simulate B?

EDIT:  
I think I see how, but would still like confirmation 🙂  
I added the domi fit under ‘Projected’ 3 times, but I only put 1 remote cap transmitter and 1 remote armor repairer ‘Active’; the other are ‘Online’. I’m assuming PyFa will then calculate it as if the other 3 Domi’s all use 1 of their remote cap transmitters and 1 remote armor repairer on me. Is that assumption correct?

 ![pyfa](https://global.discourse-cdn.com/eveonline/original/4X/1/3/d/13db313ca13a3a296a745ccb3547bf19fddf24ad.png)

---

<div class="post-metadata">

**Author:** ![Posh\_Wynoa\_Spice](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/posh_wynoa_spice/32/455534_2.png) [@Posh\_Wynoa\_Spice](https://forums.eveonline.com/u/Posh_Wynoa_Spice)\
**Post date:** [June 9, 2022, 6:24pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/407 "2022-06-09T18:24:41Z")

</div>

I believe you need to split manually.

PYFA simulates from the ship’s perspective, so you need to put in how many of the remote modules are being used on your ship specifically.

---

<div class="post-metadata">

**Author:** ![Pandoralica](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/pandoralica/32/374133_2.png) [@Pandoralica](https://forums.eveonline.com/u/Pandoralica)\
**Post date:** [June 21, 2022, 7:56pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/408 "2022-06-21T19:56:54Z")

</div>

Any chance to get Drone EHP displayed in Pyfa? :\>

---

<div class="post-metadata">

**Author:** ![Jita\_Point\_Bot](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/jita_point_bot/32/383046_2.png) [@Jita\_Point\_Bot](https://forums.eveonline.com/u/Jita_Point_Bot)\
**Post date:** [June 21, 2022, 8:53pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/409 "2022-06-21T20:53:56Z")

</div>

Is there a quick way to plug in max alpha skills or do I gotta put in all the legwork?

---

<div class="post-metadata">

**Author:** ![nut-case](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/nut-case/32/422699_2.png) [@nut-case](https://forums.eveonline.com/u/nut-case)\
**Post date:** [June 24, 2022, 1:03pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/410 "2022-06-24T13:03:07Z")

</div>

v2.43.0  
Medium Mercoxit Mining Crystal Optimization I - not taken into account in mining calculations  
1.16 ratio

---

<div class="post-metadata">

**Author:** ![Jager\_Moritz](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/jager_moritz/32/294334_2.png) [@Jager\_Moritz](https://forums.eveonline.com/u/Jager_Moritz)\
**Post date:** [June 24, 2022, 4:34pm UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/411 "2022-06-24T16:34:36Z")

</div>

Is there any possible way to run Pyfa on Android? Thru OS emu or python dev kits?

---

<div class="post-metadata">

**Author:** ![Jugular\_Vein](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/jugular_vein/32/330257_2.png) [@Jugular\_Vein](https://forums.eveonline.com/u/Jugular_Vein)\
**Post date:** [August 18, 2022, 1:06am UTC](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156/412 "2022-08-18T01:06:42Z")

</div>

Is it intentional that pyfa shows capital module volume in cargohold as assembled volume instead of the smaller packaged volume?

[Previous page](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156.md?page=19)

[Next page](https://forums.eveonline.com/t/pyfa-the-python-fitting-assistant/27156.md?page=21)
