Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

while package it with pyinstaller, it occur FileNotFoundError with temp-user-path like c:\\Users\\userName\\AppData\\Local\\Temp\\**\\Equation #38

Open
xflyyxfl opened this issue Feb 2, 2020 · 1 comment

Comments

@xflyyxfl
Copy link

xflyyxfl commented Feb 2, 2020

while package it with pyinstaller then run exe-file, it occur FileNotFoundError with temp-user-path like c:\Users\userName\AppData\Local\Temp\_MEI**\Equattion

Details error occur in Equation_init_.py line 93 and 75 while loading.

Dynamic load from abs path makes it failed.

Equation is very good but Finally I use parse_expr and lambdify in sympy instead.

@FranSoloFran
Copy link

FranSoloFran commented Oct 12, 2020

hi @xflyyxfl could you explain how you solved it? i have a solver for Euler Differential Equation:

def EulerEcDif(self):
        f = Expression(self.dxdyfld.get(), ["y", "x"])
        x = float(self.x0cifld.get())
        y = float(self.y0cifld.get())
        xn = float(self.xnfld.get())
        n = int(self.nfld.get())

        solx = []
        soly = []
        solx.append(x)
        soly.append(y)
        h = float(xn - x) / n
        while x < xn:
            print('\nAt x=%.4f, y=%.4f' % (x, y))
            y = y + f(x, y) * h
            x = x + h
            solx.append(x)
            soly.append(y)
        plt.plot(solx, soly)
        plt.xlabel('x')
        plt.ylabel('y')
        plt.show()

and i'm trying to convert it to parse_expr but i cannot make it work. dxdyfld is where i write the expression

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants