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

Cannot run Prophet from the pyQGIS console #2656

Open
daniel-odc opened this issue Jan 28, 2025 · 0 comments
Open

Cannot run Prophet from the pyQGIS console #2656

daniel-odc opened this issue Jan 28, 2025 · 0 comments

Comments

@daniel-odc
Copy link

I am developping a QGIS plugin that uses the Prophet library. While my scripts run outside the QGIS environments, they don't work in the QGIS console.
Here are the steps to reproduce the issue:

Simple script calling Prophet:

from prophet import Prophet
import pandas as pd
df = pd.DataFrame({'ds': ['2024-01-28', '2024-01-29', '2024-01-30'], 'y': [3, 4, 7]})

model = Prophet()
model.fit(df)

Errors:

AttributeError: 'NoneType' object has no attribute 'write'
(...)
RuntimeError: Error during optimization! Command 'C:\Users\[me]\AppData\Roaming\python\Python312\site-packages\prophet\stan_model\prophet_model.bin random seed=40062 data file=C:\Users\[me]\AppData\Local\Temp\tmpvgt3h7aq\9btiqwne.json init=C:\Users\[me]\AppData\Local\Temp\tmpvgt3h7aq\s6atri3h.json output file=C:\Users\[me]\AppData\Local\Temp\tmpvgt3h7aq\prophet_model1w6jn7o2\prophet_model-20250128234237.csv method=optimize algorithm=newton iter=10000' failed:

OS: Windows 11 Pro
QGIS version: 3.34.12

Any help would be appreciated so we can combine the power of these two wonderful open source tools.

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

1 participant