Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpdf not working with .pyw #165

Open
Bagel94 opened this issue Oct 20, 2020 · 4 comments
Open

fpdf not working with .pyw #165

Bagel94 opened this issue Oct 20, 2020 · 4 comments

Comments

@Bagel94
Copy link

Bagel94 commented Oct 20, 2020

Came across an issue where having fpdf as an import will not allow my .pyw file to open outside of an IDE (Pycharm).

Used this to single fpdf out as the one that would not let my file open so that I could get it to run..
try:
from fpdf import FPDF
except:
tk.messagebox.showwarning("Failed to import.")

@alexanderankin
Copy link

does it work on python without w? also does the same hold true for https://pypi.org/project/fpdf2/?

@Bagel94
Copy link
Author

Bagel94 commented Oct 20, 2020

does it work on python without w?
Yes, as a .py it will open as normal.

also does the same hold true for https://pypi.org/project/fpdf2/?
Not sure, installed it using pip install fpdf2 and also removed fpdf (did not know if they would conflict), followed the tuturial on the link you included and I can not get it to do the "from fpdf import FPDF" gives "importerror cannot import name "FPDF" from 'fpdf' (unknown location)"

@Bagel94
Copy link
Author

Bagel94 commented Oct 20, 2020

So just uninstalled fpdf2 and tried again, its now finding the reference and still seems to be doing the same thing as before with fpdf. will not open under .pyw.

Using logger I got this"
ERROR:root:Import Issue.
Traceback (most recent call last):
File "E:\Documents\mwp\weightprog\WeightProgramV3.pyw", line 26, in
from fpdf import FPDF
ImportError: No module named fpdf

@alexanderankin
Copy link

alexanderankin commented Oct 20, 2020 via email

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

No branches or pull requests

2 participants