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

[HELP] - ValueError: source code string cannot contain null bytes #118

Open
moraesat opened this issue Mar 7, 2024 · 4 comments
Open

[HELP] - ValueError: source code string cannot contain null bytes #118

moraesat opened this issue Mar 7, 2024 · 4 comments

Comments

@moraesat
Copy link

moraesat commented Mar 7, 2024

pip install worked normal, but when I import the lib this error shows up:
Any idea?

ValueError: source code string cannot contain null bytes
Traceback:
File "C:\Users\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in run_script
exec(code, module.dict)
File "C:\Users\Dados.py", line 23, in
from financetoolkit import Toolkit
File "C:\Users\lib\site-packages\financetoolkit_init
.py", line 4, in
from .toolkit_controller import Toolkit
File "C:\Users\lib\site-packages\financetoolkit\toolkit_controller.py", line 30, in
from financetoolkit.models.models_controller import Models
File "C:\Users\lib\site-packages\financetoolkit\models\models_controller.py", line 7, in
from financetoolkit.models import (
File "C:\Users\lib\site-packages\financetoolkit\models\wacc_model.py", line 6, in
from financetoolkit.performance import performance_model
File "C:\Users\lib\site-packages\financetoolkit\performance\performance_model.py", line 11, in
from sklearn.linear_model import LinearRegression

@JerBouma
Copy link
Owner

JerBouma commented Mar 7, 2024

This seems to be related to the sklearn library. Are you on Python 3.10 or higher? Otherwise, create a new environment and install solely the Finance Toolkit. The issue most likely resides in out-of-date libraries or code unrelated to the Finance Toolkit.

@moraesat
Copy link
Author

moraesat commented Mar 7, 2024

This seems to be related to the sklearn library. Are you on Python 3.10 or higher? Otherwise, create a new environment and install solely the Finance Toolkit. The issue most likely resides in out-of-date libraries or code unrelated to the Finance Toolkit.

I'm on Python 3.10.

@JerBouma
Copy link
Owner

Did you manage to resolve this issue?

@moraesat
Copy link
Author

Nop. Still got it.

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