Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: web socket server handle onnection closed abnormally [internal])
Post: web socket server handle onnection closed abnormal...

Hello, using web socket server to send data to user now , when I shut down the client usinc CTRL+C I get this error on the server: code = 1006 (connection closed abnormally [internal]), no reason Got...
korenron General Coding Help 0 70 Sep-23-2021, 09:26 AM
    Thread: get data from 2 async functions
Post: get data from 2 async functions

hello, I'm running 2 simple async function (getTime and get random rumber) the functions are working without any problems I want to be able to read the current data using websocket. I have try to r...
korenron General Coding Help 0 97 Sep-22-2021, 08:39 AM
    Thread: Help with WebSocket reading data from anoter function
Post: Help with WebSocket reading data from anoter funct...

hello , I'm trying to write a code of reading data from canbus and using websocket to read "Live Data" the web server is up(I can see the "Server Up" message and also able to connect the port 8765 u...
korenron General Coding Help 0 129 Sep-19-2021, 11:08 AM
    Thread: enter string into list according to a known rule
Post: RE: enter string into list according to a known ru...

yes this is what I want because Bytes are numbers from 1-8 and in the list it's 0-7 I understand what you said about the str and list my item was a list on 1 item .... this was my mistake now ev...
korenron General Coding Help 10 508 Aug-12-2021, 02:19 PM
    Thread: enter string into list according to a known rule
Post: RE: enter string into list according to a known ru...

Will this help? def CutData(FullData, StartByte, length=1): StartByte = StartByte - 1 EndByte = StartByte + length print(f'full data is {FullData}' + str(type(FullData))) Data_Byte =...
korenron General Coding Help 10 508 Aug-12-2021, 07:16 AM
    Thread: enter string into list according to a known rule
Post: RE: enter string into list according to a known ru...

But if I want to converte only 1 item in list? for example item on 4 place only? def CutData(FullData, StartByte, length=1): StartByte = StartByte - 1 EndByte = StartByte + length print(f...
korenron General Coding Help 10 508 Aug-12-2021, 07:08 AM
    Thread: best way to use switch case?
Post: RE: best way to use switch case?

OK, love the idea :-) but as I said I ahve around 20 PID to analyze , so I guess the best and clean way will be methods ? but I never done it before , can you show example \ link for exaplin ? Tha...
korenron General Coding Help 8 514 Aug-12-2021, 06:32 AM
    Thread: enter string into list according to a known rule
Post: RE: enter string into list according to a known ru...

(Aug-11-2021, 02:06 PM)DeaD_EyE Wrote: The provided example could not work because the quoting is missing. import binascii from_your_post = "d8 59 80 a2 c8 be f4 92".replace(" ","") # unhexlify ...
korenron General Coding Help 10 508 Aug-11-2021, 02:46 PM
    Thread: enter string into list according to a known rule
Post: RE: enter string into list according to a known ru...

(Aug-11-2021, 01:58 PM)Yoriz Wrote: Split the string on space's data = 'd8 59 80 a2 c8 be f4 92' data_list = data.split(' ') print(data_list)Output:['d8', '59', '80', 'a2', 'c8', 'be', 'f4', '92'] ...
korenron General Coding Help 10 508 Aug-11-2021, 02:41 PM
    Thread: enter string into list according to a known rule
Post: enter string into list according to a known rule

Hello, I want to make the following : today I'm reading canbus data in this form (the data is string type) Data = d8 59 80 a2 c8 be f4 92I want to make a function the take the data, put every 2 digit...
korenron General Coding Help 10 508 Aug-11-2021, 01:50 PM
    Thread: best way to use switch case?
Post: RE: best way to use switch case?

OK I didn't thought it metter this is what I want to do: read canbus data (I have this working now) read the PID ( I have this working now) according to the PID analyze and print what can I know fr...
korenron General Coding Help 8 514 Aug-11-2021, 01:35 PM
    Thread: best way to use switch case?
Post: RE: best way to use switch case?

today I know what data goes on which pid for example : pid 789 data spped pid f14 data is total distance . . . I know how to read and analyze them (this is no the problem) I want to know waht wil...
korenron General Coding Help 8 514 Aug-11-2021, 01:16 PM
    Thread: best way to use switch case?
Post: best way to use switch case?

Hello. I'm reading data that could have ~ 20 differents options (PID from canbus) what would be the best way to analayze it? using switcher case? using if,elif? other option ? Thanks,
korenron General Coding Help 8 514 Aug-11-2021, 12:43 PM
    Thread: python-can help
Post: RE: python-can help

Thank you for the explain and exmaple :-)
korenron General Coding Help 3 404 Aug-11-2021, 05:49 AM
    Thread: python-can help
Post: python-can help

Hello, I want to start a project of reading canbus data using python-can. i want to be able to save the data\pid and analyze it I took the first example import can bus = can.interface.Bus(channel...
korenron General Coding Help 3 404 Aug-10-2021, 11:36 AM
    Thread: write new function or change the old one to work "smartter?
Post: RE: write new function or change the old one to wo...

Simple excel file 1 sheet, 1 column, no headline - I keep it very simple 5583680 1583808 3983809 8583810 1583811 2583812 6583813 . . .I know how to work with this type of data from excel (this is n...
korenron General Coding Help 3 248 Aug-09-2021, 10:25 AM
    Thread: write new function or change the old one to work "smartter?
Post: write new function or change the old one to work "...

Hello, I have created a code that update data into my DB according to my inputs def MainPage(): ID= input('What is the ID?\n\r') OldCom = input('What is the old company ID?(1, 2, 3, 4\n\r')...
korenron General Coding Help 3 248 Aug-09-2021, 09:14 AM
    Thread: Illegal instruction? working code for months?
Post: RE: Illegal instruction? working code for months?

this is very strange...... I have created a file with all the import: import time from datetime import datetime import Adafruit_SSD1306 import subprocess from PIL import Image from PIL import ImageDr...
korenron General Coding Help 4 443 Aug-05-2021, 09:57 AM
    Thread: Illegal instruction? working code for months?
Post: RE: Illegal instruction? working code for months?

when I run the command it's working [email protected]:~ $ python3 -c "print('ok')" okso now try to check all the imports I have in the code ? to see which one casue the problem ? then reinstall it ?
korenron General Coding Help 4 443 Aug-05-2021, 06:39 AM
    Thread: Illegal instruction? working code for months?
Post: Illegal instruction? working code for months?

Hello , strange issue I have a PI3 working with a python code that show data on I2C Oled display. this code and PI works great for the last 6 months~ today I saw it's stop working (showing data - ...
korenron General Coding Help 4 443 Aug-04-2021, 12:48 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020