I got an error file is undefined when uploading file in nestjs - nestjs

enter image description here
enter image description here
can anyone tell me how to fix it, thanks.

Related

How to add a image into PyCharm on Mac

I am trying to use tkinter to make a GUI and everything works for me except getting an image to import. The error is this:
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't open "MainDisk/Users/Matt/PythonProjects/Car_image.jpg": no such file or directory
My line of code:
photo = tk.PhotoImage(file="MainDisk/Users/Matt/PythonProjects/Car_image.jpg")
Is this the way that you would import an image on Mac? Sorry I am very confused and just am not sure how to get this to work. The image is in the right place but I have to be doing something wrong clearly. Me and someone else had this working on a windows computer but can't get it to work on Mac.
You can try :
photo = tk.PhotoImage(r"MainDisk/Users/Matt/PythonProjects/Car_image.jpg")

Error in Resize Images Extension Firebase

I'm using the resize images extension of firebase, and in some images the resize function faild with this error:
"Error when resizing image [Error: VipsJpeg: Invalid SOS parameters for sequential JPEG
VipsJpeg: out of order read at line 0
] "
Someone know about this error and how to solve it?
Thanx!

Correct my code please and tell me what i am doing wrong in it?

import cv2
image = cv2.imread("palm.jpg")
cv2.imshow("palm", image)
cv2.waitKey(0)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
Error in my screen:
cv2.imshow("palm", image)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
Hey unfortunatly my reputation is not enough to comment, so I post this as an answer: I had this problem as well a couple of times. Every single time it turns out that I provided an incorrect path to the file.
I tried the code myself creating a palm.jpg in the same directory as the script I'm opening it with. It showed the BGR-Image as your code intends.
To me this means that opencv cannot open your "palm.jpg". To get more information you can try to set a breakpoint before the line
cv2.imshow("palm", image)
and have a look at the variable "image". If it does not contain meaningful information, you should have a look at List files ONLY in the current directory to check why palm.jpg is not in your working directory.
If it is on your working directory, maybe the palm.jpg is actually a palm.jpg.png (or similar).

i need help for solving this , im not able to understand the error

I'm getting this these days .but i'm not able to solve this while running a server
[enter image description here][1]
enter image description here
Somewhere in your code you've imported from django.contib, which is incorrect. It should be django.contrib (notice the missing r in contib).

I cannot delete an image in tmp folder when lamda function is triggered

I am generating an image using netwrokx library with the user's responses to my questions in the path /tmp/networkx.png in AWS lambda and mailing the user's this image.
[networkx.png without any overlapping]
The problem I am facing here is after each session the image is not getting deleted in the tmp folder and in the next session the images overlaps.
[networkx.png with overlapping]
I have tried the following -
def delete_image():
if os.path.exists("/tmp/networkx.png"):
os.remove("/tmp/networkx.png")
print("removed the image")
else:
print("Image not removed")
Can anybody tell me how to delete the image in tmp folder once the image has been mailed to the user.
For anyone who comes across the same problem.
Please clear your image using :
plt.clf()
Then save the image you created :
plt.savefig("/tmp/networkx.png")<br>
And then close the image window:
plt.close("/tmp/networkx.png")<br>

Resources