I am having trouble running the assignment files from bracket to chrome browser

I am unable to run the code in the chrome as it does not
open in web chrome browser after I have saved and written the code in bracket.

Web Server for chrome is not working for the latest version of Google Chrome.
How to do I complete this assignment. @chris.favila
Kindly anyone guide. what is the issue?? @Mubsi

thank you
DP

1 Like

Hi Deepti. Please give me the next 18 to 24 hours to resolve this issue. We’ll most likely recommend another web server but will have to place instructions to go along with it. Hope it’s okay. Thanks!

yes Chris, I only want some reply or solution to my problem, stuck since 4 days. I will be waiting for your reply. Thank you for replying.

Cheers
DP

1 Like

Hi Deepti. We’re still working on updating the instructions in the course. For now, you can do these steps to get your assignment running. You will be using the built-in http-server in python. I’m assuming you have Python3 installed.

  1. From your Terminal, navigate to the folder of your assignment.
  2. From there, type: python3 -m http.server. You should see an output like: Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
  3. Open your web browser and type: 0.0.0.0:8000/<filename of the HTML file> in the address bar (or whatever IP address was printed out in step 2. For example: 0.0.0.0:8000/C1_W1_assignment.html.
  4. You can now open the Developer Tools console and see the training progress.

Hope these also work for you. Just let me know if you encounter any problems. Thanks!

1 Like

you mentioned your web browser, so I can use my default browser(safari) or I need to use chrome browser??

1 Like

Yes I have python 3.11

1 Like

I used Chrome but it should also work in Safari

1 Like

Hi Deepti. From the DM, please type the command exactly as shown above. Be careful with adding spaces because it may lead to different results (e.g. opening the Python interactive shell instead of running the http.server module.). Hope this helps.

2 Likes

ok I solved the issue opening the web chrome server, but as I have completed the assignment on the bracket, and followed your instructions

I get this on the web chrome browser

What should I do now?

Thank you
DP

1 Like

Hello Chris,

I noticed one more thing on the terminal

DrDKPC1_W1_Assignment.html HTTP/1.1" 200 -

::1 - - [07/Aug/2023 11:37:58] code 404, message File not found

::1 - - [07/Aug/2023 11:37:58] “GET /data/wdbc-train.csv HTTP/1.1” 404 -

so it means the data downloaded for the assignment is not found.

How do I solve this issue??
Anyone who has done this course can also help :slight_smile:

Regards
DP

Hi Deepti. It seems like you did not download the dataset to your workspace. Hence, the error. Alternatively, you can just clone the public repo. Please do that so it will have all the files needed to complete the assignment. You should have the same folder structure so your file will know where to look (e.g. under a ‘data’ folder).

Another thing to check is if you’re running the http.server command under the same folder as your html file. It seems like you ran it from a different folder so it can’t find the ‘data’ folder.

how do I check/verify this. I have saved the concerned file on desktop. do I need to place the file in the C-drive??

One way to check is if you go to the base URL, it will show the assignment and a data folder like this:

baseurl

1 Like

The folder where you type python3 -m http.server should have:

  1. the HTML file
  2. a data folder containing the CSV file

That is how it is structured in the public repo. Again, you can check by just going to the base URL. In your case, http://[::]:8000. It should show the same files as in my screenshot. Then you can just click the HTML file from there and check the developer tools. Hope this helps.

ok at this place I am getting the error. So basically my file is not placed in the right folder?? I am sorry I am a non-IT, so giving you trouble.

also for one of the errors I encountered, when I searched here I got this post.

Please compare your screen to the previous screenshot (i.e. when you go to http://[::]:8000). That should tell you if you’re on the right track. Please solve that first before moving on to something else. Solving multiple things at once might make things worse.

Ok issue of web browser is resolved, but I am getting this input error of reference error. for which I used the refer post which I just shared with you, at that time I get a different output. Can anyone guide me further?

with the first error, the below image is the error

by using the referred this post Programming Assignment: Breast Cancer Classification error - #3 by James_J_Johnson, I got the below output

Now is my code has error, or something else? I want someone to have a look

Regards
DP

I just wanted to mention some pointer for non-IT people, in case they encounter same issue in future.

  1. Please use bracket to do your assignment (meaning to write or edit your code)

  2. As mentioned by Chris, you need to have python 3 version and then in the terminal type as mentioned by Chris in your terminal the below
    python3 -m http.server
    FOR WHICH YOU WILL GET OUTPUT SOMETHING LIKE THIS(IT WILL BE DIFFERENT FOR YOUR SYSTEM)
    Serving HTTP on :: port 6000 (http://[0 0 ]:6000/)

  3. This part has to be done in Chrome browser. Next copy this part from the above output [0 0 ]:6000/(mention the file/assignment you are working) on the chrome browser. At this point was stuck as my download directory was not in the direct directory. So make sure you need to put the assignment folder for this course in your direct/local directory. In case you are not able to find your local directory. Open another browser and type this http://localhost:6000 to know where you file should be for the chrome browser to read/detect the file in your local directory.

  4. Once you have open the assignment in the chrome browser and enter the output from above statement like this [0 0 ]:6000/C1_W1_Assignment.html
    you need to follow the below image, you need to click to the developer tools in this image

  5. Once you click the developer tool, you will find the below image

Here the Sources will give you log about your code as well as epoch. if you click console, you will find your epoch log for model you trained

Hope it helps!!!

Regards
DP

Hello Chris,

I solved the assignment and passed the grader. As I am non-IT person, I was not able to understand things faster here. Thank you for your guidance.

Regards
DP

1 Like

Hello i have the same issues but when i try to run the python 3 the output become like this Serving HTTP on :: port 8000 (http://[::]:8000/) … and when i access it, it says This site can’t be reached

The webpage at http://[::]:8000/ might be temporarily down or it may have moved permanently to a new web address.

ERR_ADDRESS_INVALID , can anyone help me solve this problem? because im a non-IT person too
Thanks