Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: send all pictures instead of just two
Post: RE: send all pictures instead of just two

data = s.recv(440179) refers to the size of the first picture sent. That number actually gave me some sort of outcome (2 pics were displayed). And the 'image' line is a line that I took from my previo...
mcgrim Networking 10 5,080 Nov-08-2019, 08:40 AM
    Thread: send all pictures instead of just two
Post: RE: send all pictures instead of just two

here is the client. The server is the same. ##### CLIENT CODE import socket from PIL import Image import io host = "127.0.0.1" port = 5000 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s....
mcgrim Networking 10 5,080 Nov-07-2019, 12:21 PM
    Thread: send all pictures instead of just two
Post: RE: send all pictures instead of just two

with this code, the files are transferred, but I am now not sure how to display images. Implementing this code after line 35 image = Image.open(io.BytesIO(b'received')) image.show()gives me...
mcgrim Networking 10 5,080 Nov-07-2019, 12:04 PM
    Thread: send all pictures instead of just two
Post: RE: send all pictures instead of just two

May you please tell me what line 22 does ? there are some bugs there, but if you tell me what is meant to do I can perhaps rewrite it.
mcgrim Networking 10 5,080 Nov-07-2019, 11:14 AM
    Thread: send all pictures instead of just two
Post: RE: send all pictures instead of just two

It looks like the bytes are transferred, thank you, but now I am not sure how to implement the image show algorithm. I tried to change the client this way: import socket from PIL import Image import...
mcgrim Networking 10 5,080 Nov-07-2019, 09:49 AM
    Thread: send all pictures instead of just two
Post: send all pictures instead of just two

The server is supposed to send all pictures from a folder to the client. By changing the number inside of the parenthesis of s.recv() in the client side I was able to display two pictures. My question...
mcgrim Networking 10 5,080 Nov-06-2019, 09:35 PM
    Thread: help with sending and receiving pics taken
Post: RE: help with sending and receiving pics taken

Doesn't anyone know how to help me? I am not asking anything too demanding. Let me know if there are any problems in my way of asking, so I can rearrange.
mcgrim Networking 9 5,877 Nov-06-2019, 07:45 PM
    Thread: help with sending and receiving pics taken
Post: RE: help with sending and receiving pics taken

I noticed that the loop in line 33 on the server code only takes the first picture, when I thought it would iterate through the entire list, how so? how to fix it ? these lines alone path1 = (r"C:\U...
mcgrim Networking 9 5,877 Nov-06-2019, 01:53 PM
    Thread: help with sending and receiving pics taken
Post: RE: help with sending and receiving pics taken

can you or anyone actually figure out what is the mistake in the last code I posted? I was already aware of that link, but I need to see how "multiple" images are sent to the client (not from).
mcgrim Networking 9 5,877 Nov-06-2019, 08:16 AM
    Thread: help with sending and receiving pics taken
Post: RE: help with sending and receiving pics taken

I continued to work on it, by turning bytes back into images, and I am now getting an error on the client side, even though the files seem to be transferred. Error:Traceback (most recent call last): ...
mcgrim Networking 9 5,877 Nov-05-2019, 05:45 PM
    Thread: help with sending and receiving pics taken
Post: RE: help with sending and receiving pics taken

sorry, I haven't thought about it. Thanks for reminding me. Can you actually please help me? I have been stuck in this for awhile, :) Can anyone help me ?
mcgrim Networking 9 5,877 Nov-05-2019, 03:41 PM
    Thread: help with sending and receiving pics taken
Post: RE: send a few pictures

I kept working on the code and changed a few lines. Now I get no error, however, it looks like that the client is not fully executed, in other words, I should be able to see these two statements bei...
mcgrim Networking 9 5,877 Nov-05-2019, 03:28 PM
    Thread: help with sending and receiving pics taken
Post: help with sending and receiving pics taken

Ignore this post, refer to this instead: https://python-forum.io/Thread-send-a-few-pictures
mcgrim Networking 9 5,877 Nov-05-2019, 02:41 PM
    Thread: help with sending and receiving pics taken
Post: send a few pictures

I am trying to send a few pics via socket from server to client. I get this error on the client side, and I am not sure how to fix it. Error:Traceback (most recent call last): File "C:/Users/Pychar...
mcgrim Networking 9 5,877 Nov-05-2019, 12:49 PM
    Thread: cv2 show image
Post: RE: cv2 show image

the code lines before line 23 are taking pics with the webcam and storing them in the folder I mention in line 24, so those images should show.
mcgrim General Coding Help 4 9,999 Nov-04-2019, 07:55 PM
    Thread: cv2 show image
Post: cv2 show image

I am trying to display the images I take with the webcam. The iteration presents no issue, but right after the loop is finished, I get this error: Error:[ WARN:0] global C:\projects\opencv-python\op...
mcgrim General Coding Help 4 9,999 Nov-04-2019, 01:35 PM
    Thread: refused connection
Post: RE: refused connection

If I completely get rid of the lines connected to networking, I remain with the ones taking photos, and they work perfectly. So At this point I am really not sure what to print.
mcgrim Networking 10 5,995 Nov-04-2019, 12:50 PM
    Thread: refused connection
Post: RE: refused connection

i don't want the while loop to exit, I want it to keep running until I press 'q'. But somehow it stops after the 1st pic is taken. The client actually receives the image, as a matter of fact, the onl...
mcgrim Networking 10 5,995 Nov-04-2019, 11:56 AM
    Thread: refused connection
Post: RE: refused connection

I honestly don't think that the problem now is cv2. As I said in my previous reply, I got rid of line 37 and I don't get a single error. However, the iteration stops after the first picture, so I t...
mcgrim Networking 10 5,995 Nov-04-2019, 11:16 AM
    Thread: refused connection
Post: RE: refused connection

well, if I get rid of line 37 on the client side, I get no error but the loop stops at the first image. Does that tell you anything?
mcgrim Networking 10 5,995 Nov-03-2019, 10:13 AM

User Panel Messages

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