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

fava not working in winpython #1804

Closed
holahapi opened this issue May 12, 2024 · 6 comments
Closed

fava not working in winpython #1804

holahapi opened this issue May 12, 2024 · 6 comments
Labels
platform:windows Issues related to using Fava on Windows

Comments

@holahapi
Copy link

I'm new to beancount and Fava

I'm a beginner with beancount and Fava.

When attempting to run them in WinPython (portable Python), the server only shows a blank page.
What could be causing this issue?

@yangyun98
Copy link

You need to change the win's registry to do so,I did this successfully.
like this #1446 (comment)

@holahapi
Copy link
Author

Thanks for your help! I'd rather not touching the registry. I'll just wait for the problem to be fixed. Thanks again!

@yagebu
Copy link
Member

yagebu commented May 22, 2024

A workaround was added for that issue in #1672, so that shouldn't be causing it.
Does the browser console show any errors or other logs? Does the Fava application log any errors? Which versions did you install?

@holahapi
Copy link
Author

holahapi commented May 24, 2024

the version that i use are

Python                        3.9.10
beancount                     2.3.6
fava                          1.27.3

when i run in the console, it shows

Microsoft Windows [Version 10.0.19045.3570]
(c) Microsoft Corporation. All rights reserved.

D:\folder\folder2>"B:\folder\winpython\_mainApp\WPy64-39100\python-3.9.10.amd64\Scripts\fava.exe" -p 44444 "D:\folder\beancount_accounting\simple\basic.beancount"
Starting Fava on http://127.0.0.1:44444

when i open the url, it display an whole white page, the chrome console shows:

:44444/static/app.js?mtime=1714918753:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

@yagebu
Copy link
Member

yagebu commented May 25, 2024

mhh, so that workaround does not seem to be working - can you try fixing your registry or seeing whether it works with a more up-to-date Python version.

What does the following Python script output?:

import mimetypes

print(mimetypes.guess_type('app.js'))
print(mimetypes.types_map.get(".js", ""))
mimetypes.add_type("text/javascript", ".js")
print(mimetypes.guess_type('app.js'))

@holahapi
Copy link
Author

holahapi commented May 25, 2024

import mimetypes

print(mimetypes.guess_type('app.js'))
print(mimetypes.types_map.get(".js", ""))
mimetypes.add_type("text/javascript", ".js")
print(mimetypes.guess_type('app.js'))

output

('text/plain', None)
text/plain
('text/javascript', None)

After further testing, I found out that WinPython 3.9 works with Beancount and Fava in VMware Workstation.

I guess the issue was caused by having another Anaconda Python installation.

@yagebu yagebu added the platform:windows Issues related to using Fava on Windows label Jun 23, 2024
@yagebu yagebu closed this as completed Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:windows Issues related to using Fava on Windows
Projects
None yet
Development

No branches or pull requests

3 participants