Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Help setting up Pycharm & Remote Pi
Post: RE: Help setting up Pycharm & Remote Pi
(Sep-16-2021, 08:32 PM)deanhystad Wrote: Take a look at this or related articles:
https://www.jetbrains.com/help/pycharm/r...oduct.html
I tried to follow the instructions, "From the main menu, choo... |
|
PickyBiker |
General Coding Help |
3 |
1,985 |
Sep-17-2021, 04:04 PM |
|
|
Thread: Help setting up Pycharm & Remote Pi
Post: RE: Help setting up Pycharm & Remote Pi
So I figured out that even though the source script is on the Raspberry Pi, when I run the script from PyCharm the script is running on the PC.
So I guess the question becomes how can I configure t... |
|
PickyBiker |
General Coding Help |
3 |
1,985 |
Sep-16-2021, 08:22 PM |
|
|
Thread: Help setting up Pycharm & Remote Pi
Post: Help setting up Pycharm & Remote Pi
First, I am new to both PyCharm and the tornado web server.
I am trying to setup a configuration to run the tornado web server with PyCharm and a remote raspberry Pi. The Pi home directory is connect... |
|
PickyBiker |
General Coding Help |
3 |
1,985 |
Sep-16-2021, 08:14 PM |
|
|
Thread: Trouble with global variables
Post: RE: Trouble with global variables
What a great place to learn. Now I understand the original issue with the variables not being global even though they appeared to be to me.
Please note that I did take seriously the idea of passing t... |
|
PickyBiker |
General Coding Help |
8 |
5,179 |
May-17-2017, 04:36 PM |
|
|
Thread: Trouble with global variables
Post: RE: Trouble with global variables
Thank you. I learned that placing the variables after the if __name__ == __"main"__: makes it clear they will be executed. You also demonstrated how to send the arguments to the function. I also lea... |
|
PickyBiker |
General Coding Help |
8 |
5,179 |
May-17-2017, 04:15 PM |
|
|
Thread: Trouble with global variables
Post: RE: Trouble with global variables
I indented line 22, but the error still occurs.
I agree that most times I should provide the arguments but occasionally, it's hard to do that. This is a case where that would be easy to do, but I st... |
|
PickyBiker |
General Coding Help |
8 |
5,179 |
May-17-2017, 02:36 PM |
|
|
Thread: Trouble with global variables
Post: Trouble with global variables
In the simple code below, schedule_last_update in the function check_schedule_file() is seen as a local variable and generates an error at line 15 claiming it is referenced before being assigned a val... |
|
PickyBiker |
General Coding Help |
8 |
5,179 |
May-17-2017, 02:01 PM |
|
|
Thread: Code doesn't seem to write anything
Post: RE: Code doesn't seem to write anything
Playing with it again this morning, and figured out the problem. I just moved the sleep down the file AFTER the try block.
It works now because the try doesn't close the file until the end of the try ... |
|
PickyBiker |
General Coding Help |
13 |
8,573 |
May-12-2017, 10:14 PM |
|
|
Thread: Code doesn't seem to write anything
Post: RE: Code doesn't seem to write anything
I'll go ahead and try that, but here is something I found on the difference between dump and dumps.
"There isn't pretty much anything else to add other than what the docs say, if you want to dump th... |
|
PickyBiker |
General Coding Help |
13 |
8,573 |
May-11-2017, 12:07 AM |
|
|
Thread: Code doesn't seem to write anything
Post: RE: Code doesn't seem to write anything
Okay, thank you to all. Here is the corrected code with a call to main. The problem was I inadvertently left out the call to main when I posted my code, but it was actually in my code. I also remove t... |
|
PickyBiker |
General Coding Help |
13 |
8,573 |
May-10-2017, 11:17 PM |
|
|
Thread: Code doesn't seem to write anything
Post: RE: Code doesn't seem to write anything
I appreciate the comments that I am not calling main so nothing is running.
I need help understand that because the print to the console in main is working as expected. How is it possible to not ca... |
|
PickyBiker |
General Coding Help |
13 |
8,573 |
May-10-2017, 09:04 PM |
|
|
Thread: Code doesn't seem to write anything
Post: RE: Code doesn't seem to write anything
I am troubleshooting a problem between RPi and Windows. The problem is complex so I wrote the code in the original post to simplify troubleshooting. The sketch runs on a RPi and all it does is write ... |
|
PickyBiker |
General Coding Help |
13 |
8,573 |
May-10-2017, 08:54 PM |
|
|
Thread: Code doesn't seem to write anything
Post: Code doesn't seem to write anything
Please help me understand why this doesn't write the count to the status.json file.
import json
import os
import time
import datetime
# write the status file data
def main(self):
string = {"... |
|
PickyBiker |
General Coding Help |
13 |
8,573 |
May-10-2017, 06:24 PM |
|
|
Thread: File access confusion python windows
Post: File access confusion python windows
This problem is difficult to explain, I hope I get the idea across ok.
There is a json file on a Raspberry Pi. I have a continuously running program (Visual Basic) on my windows laptop that is readi... |
|
PickyBiker |
General Coding Help |
0 |
3,376 |
May-08-2017, 05:36 PM |
|
|
Thread: Help with Try With
Post: RE: Help with Try With
Yes, That is exactly what was wrong. Thank you. |
|
PickyBiker |
General Coding Help |
2 |
3,826 |
May-04-2017, 01:49 AM |
|
|
Thread: Help with Try With
Post: Help with Try With
The code below is an attempt to catch an error opening and parsing a JSON file. When an error occurs, it does not print the text in the except block. Can someone explain this?
Python 2.7 on raspberry... |
|
PickyBiker |
General Coding Help |
2 |
3,826 |
May-03-2017, 07:48 PM |
|
|
Thread: Python .json problem with UTF-8 file
Post: RE: Python .json problem with UTF-8 file
This one was actually resolved by the person who created the json file. He removed the UTF-8 BOM at the front of the file. However, the solutions above have been noted for the future. Thank you ! |
|
PickyBiker |
General Coding Help |
5 |
12,794 |
Dec-28-2016, 04:56 PM |
|
|
Thread: datetime unexpected result
Post: RE: datetime unexpected result
This one is resolved by changing the /etc/localtime file. Deleted it and then copied /usr/share/zoneinfo/US/Central to /etc/localtime
Everything works fine now. |
|
PickyBiker |
General Coding Help |
10 |
9,136 |
Dec-27-2016, 10:47 PM |
|
|
Thread: datetime unexpected result
Post: RE: datetime unexpected result
The problem has been isolated to the remote deployment from the PC to the RPI.
I copied the program to the RPI and ran it there. The resultant local times are correct.
The incorrect times are only... |
|
PickyBiker |
General Coding Help |
10 |
9,136 |
Dec-27-2016, 09:10 PM |
|
|
Thread: datetime unexpected result
Post: RE: datetime unexpected result
When I originally posted, i was getting 17 instead of the 11 I would expect at 11 AM CST.
Yes, the code you posted was copied and pasted into the program and it comes up 6 hours off. Again, if I use... |
|
PickyBiker |
General Coding Help |
10 |
9,136 |
Dec-27-2016, 01:21 AM |