Dapp Introduction

Nothing shows up. It just stopped responding. When I push Enter I just go to the next line and nothing happens at all. Even for python -m http.server 8000.
I have even reinstalled my windows.

Python doesn't work

It was not working for me either. Then after some test it seems it’s working on Brave 1.13.82 Chromium: 85.0.4183.83 (Official Build) unknown (64-bit) . I’m talking about this lesson: https://academy.ivanontech.com/products/ethereum-smart-contract-programming-201/categories/1993956/posts/6700032
I’m not able to reproduce the “not working” condition.
One thing I did was:

  1. Doing inspect (going in develop mode on brave)
  2. right click on the reload button and select “Empty cache and hard reload”

Hope it helps.

1 Like

After I have restarted my Laptop, I am getting this error all the time:

I have found a fix. I had Reset the account in Metamask. Go to Metamask -> Settings -> Advanced -> Reset Account

4 Likes

@Taha
I have my truffle running, python is running. My metamask connected to localhost:8000.
But it doesn’t show the javascript alert when I click on the button. What am I doing wrong?

var web3 = new Web3(Web3.givenProvider);

var contractInstance;

$(document).ready(function() {
window.ethereum.enable().then(function(accounts){
contractInstance = new web3.eth.Contract(abi, “0xF87bddC1A92EC5b61C1b24BA0869F78059BC1B9A”, {from: accounts[0]});
});
$("#add_data_button").click(inputData);
});

function inputData(){
alert(“inputdata”);
}

Could it have something to do with these errors? If so how do I get rid of them?

Screen Shot 2020-09-10 at 4.16.16 PM

Hey @elterremoto

These are warnings from Metamask and we can’t get rid of them.
Please create a repo on github and upload your code (both from and back end). Once done post the link here so that I can check.

Dani

1 Like

Does anyone know the final People.sol repository? I think I broke it and I am not sure what’s wrong.

I had the same issue and I just saw this. I will try the firefox download.

You are awesome!! I was also redoing everything… But FireFox worked it took me a bit set up metamask again but all is working. Let me know if anyone figures out why it doesn’t work for Chrome.

1 Like

Hi community,
@filip mentioned that we need to download python in order to host a website. I am not quite sure which one to install. Is it this web https://www.python.org/downloads/ ?

Why is it giving me this feedback?

Anyone can please help me?? I can’t figure out how. I can’t proceed cause this problem is stopping me.

Anyone can help me? I been stuck at this problem for some time already. Appreciate someone to help me solve this. Thanks

Hey @Marcus_Tang

Try the following and tell me the results:

  • Open the Powershell application
  • Execute command : type python --version and press enter.
  • The Python version appears in the next line below your command.

Also do the same but with

python3 --version
1 Like

Thx for the reply @dan-i,
This is what I get,

@Marcus_Tang
What happens if you try python3 --version?

If the command above does not return any result, you need to install python.
There is a guide on Microsoft.com, below I did it for you and added screenshots.

  • Once the installation is completed, open PowerShell and type python3 --version, the version should pop up now.
    Check_Version

  • Now you are ready to use your http server by typing : python3 -m http.server

HttpsServer

Happy coding,
Dani

Thanks very much @dan-i

Hey @thecil!
I have a problem with getting my localhost:8000 to save the changes that I make in the code. I put in the changes, than save. Then I reload the webpage. However the changes do not show up. Then I wait for awile (perhaps an hour or so) then the changes show up. Taha tryed to help but he couldn’t figure it out. He allso checked my code and every thing checked out. I was wondering if you could help me with this issue.
Thanks!

Hi @dan-i,
I encounter another problem. Idk why when inspect my dapp code through the browser, the console.
Untitled
whats the problem?
Here is all my codes.



@Marcus_Tang Create a repo on github with your code and post the link here.

Thanks
Dani