-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error In just the printing statement #12
Comments
@inst-cicada Could you check for trailing spaces in your output? It's likely that the dot character is being used to indicate additional spaces at the end of the line in your output. The test doesn't handle additional spaces within the output lines, at the moment. |
The same error persists in my system too. I'm using python and regardless of whatever is done, regex, strip, split, join; nothing works. Removing whitespace, newlines, others, nothing is working. |
I'm having the same issue, where that (·)dot comes when I test the code with npm test with Python I'm not a specialist but I think its becz windows uses Windows-1252 and npm tests are converting text to utf-8. on Top of that (again i think) python by default uses system encoder "Windows-1252" on Windows and after python 2.0 there is no easy option to change encoding (or I'm unable to find) so that "\n" (Windows-1252) is converted to (·) utf-8 still not sure
I tried my code on Ubuntu (linux) and it works without any problem 👍 EDIT: instead of print(string_variable) try sys.stdout.buffer.write(string_variable.encode('utf8')) and don't forget to import sys to print to console, (where String_variable is ur variable name) Hope helps :-) |
Yeah, I'll try doing that. Thanks a lot @MrAdiii! |
I am using Cpp, can you tell me the solution for dot problem ??? |
Try on Linux, running on Ubuntu fix the problem for me in Python |
Yeah @MrAdiii is right, try linux. If you dont have a linux operating sys, try using one with the help of VMWare. One more workaround discovered was that in python using the print statement with end in no spaces as print(text,end='') also works. Since python by default has end='\n', changing it to '' would help. |
found a solution for Python on Windows instead of print(string_variable) try sys.stdout.buffer.write(string_variable.encode('utf8')) and don't forget to import sys to print to console, (where String_variable is ur variable name) thanks to |
I fixed the issue. It took because I was having exams. I encoded it to utf8. It fixed it for me. Thank you. |
Yes. Sempai. ;-) |
https://stackoverflow.com/questions/45575863/how-to-print-utf-8-strings-to-stdcout-on-windows I haven't tried but, check this |
Before running npm test in your todo.py directory please run |
Hello, 'D:\Java' is not recognized as an internal or external command, Everything is working fine on command line, it is npm test which is showing errors. My working folder is in "D:\java" |
The issue was with your directory path which contains space in the folder names and child_process package couldn't able to resolve it. |
The issue was might be with your directory path which contains space in the folder names and child_process package couldn't able to resolve it in todo.test.js. |
export is not for windows maybe , how to change that , because of export command this line is reoccuring |
As others said, its due to space in the path name. So here's how you can fix it (it worked for me): This will tell the cmd that the space encountered is a part of the path and it wont end there. Hope this helps. |
It works in some cases but didn't work for me. |
hey!! can you please help me .. because I assume that my code is correct but still test cases are failing .. |
ya same issue here pls help |
were you using c++, or other language? If c++, can you tell how you resolved this issue. |
How to rectify this? |
I was unable to submit my zip file. Though i was uploading a file with .zip extension , it is giving me error as: |
It says 'remove any binary file before uploading'. |
Should I also remove the 'package-lock' folder from my zip folder that I want to upload? |
any solution of this in C++ ? |
Remove the |
I am unable to uplaod my zip file it says application error at heroku app |
same here |
you need to create a txt file to insert list data |
everything is working fine on Linux platform this problem is only on windows. |
I'm unable to understand where exactly am I supposed to have the text files. Because it always throws an error that text file is missing in the directory. When I put the text file manually, after running a test, the files disappear on their own. Would appreciate if someone could help |
Should the text files be present elsewhere and not in the application directory? |
Hey, If someone has completed the app. can you share the source code? |
@samarthshiramshetty Please see the README of the repo: Kindly desist from sharing your solution privately or publicly. This is because the programming task is not complex for those who've written non-trivial amount of code before. But for beginners, solving this can be quite instructive - frustrating at times, but rewarding in the end. But if you share your solution with them - through a GitHub repo, or by circulating in your private networks, you're only robbing them of a rewarding experience that would have helped them grow as programmers. It is trivial to detect copy-cat code submissions and students who submit plagiarized code will be unable to find a place among the limited seats in the course. It is just that it'll take us a few more moments to read through the code and tag it. A lose-lose proposition for all concerned. |
Expected: StringContaining "[3] find needle in the haystack
[2] water the plants
[1] the thing i need to do
"
Received: "[3] find needle in the haystack·
[2] water the plants·
[1] the thing i need to do·
"
I tried to put \n, different print(), and also tried tripple quoted strings but I dont know from where that (·)dot comes when I test the code with npm test. While testing with my powershell everything is fine with no dots but with npm test there is dots. Please help.
Name: Abhishek Joshi
The text was updated successfully, but these errors were encountered: