How to get weewx (tests) running from IDE?

68 views
Skip to first unread message

michael.k...@gmx.at

unread,
Feb 4, 2023, 2:14:25 PM2/4/23
to weewx-development
As a total python noob I am struggling getting anything to run. (using vscode or intellij)

I am running into ModuleNotFoundError: No module named 'weewx'

What am I missing? Are there instructions anywhere I didn't find so far?

Tom Keffer

unread,
Feb 4, 2023, 3:37:31 PM2/4/23
to michael.k...@gmx.at, weewx-development
You have a path problem. 

Under PyCharm, go to Settings | Project weewx | Project Structure.

It will show you a source tree. Click on the "bin" node, then mark it as "sources", using the button just above.


I don't know anything about vscode.



--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/68fa2f3e-7470-462f-906f-d46ee94df606n%40googlegroups.com.

michael.k...@gmx.at

unread,
Feb 5, 2023, 2:58:10 AM2/5/23
to weewx-development
Marking bin as sources worked. 
Thank you.

michael.k...@gmx.at

unread,
Feb 10, 2023, 8:46:33 AM2/10/23
to weewx-development
A more specific add-on question (new topic?):

For developing, testing and debugging python scripts in user/*, how can I start an archive interval run? Is it possible to launch a single interval run, getting data from Simulator, storing into the configured database, and doing all the stuff that registered extensions in user/* do?

Tom Keffer

unread,
Feb 10, 2023, 10:24:31 AM2/10/23
to michael.k...@gmx.at, weewx-development
I'm not following exactly what you're asking, but it's certainly possible to run weewxd in the IDE. 

The problem is that if you run the code in the repository, it will use whatever is in bin/user in the repository, which is nothing.

To get around this problem, I usually install WeeWX in /home/weewx, then run the IDE out of that. This way, it will find what's in /home/weewx/bin/user.

Hope I'm clear on that.

Reply all
Reply to author
Forward
0 new messages