Error that appears only when connecting bluetooth module

I got an arduino uno recently and it works perfectly and I haven't had any problem uploading my sketches before, but now I'm trying to connect a bluetooth module HC-05 and it gives me the following error:

avrdude: stk500_recv(): programmer is not responding

Then I restarted the arduino and the IDE and it gave me this error:

avrdude: stk500_getsync(): not in sync: resp=0x00

Then I diconnected the bluetooth module, and tried connecting and flashing a single led and it worked normally and without errors, but when I connected again the module it showed the first error once again.

Why is this? How can I fix it?

I use linux, I didn't have problems before.

This is the link to the tutorial I was using in case it helps:

You must not have anything connected to pins 0 or 1 while uploading to the board (Or using serial monitor, for that matter - at least if you want it to work) - disconnect the HC05 from those pins while uploading, then connect them when running the sketch. Those pins are used for uploads (for the same reason that they're used to communicate with the HC-05 - those are the pins that the atmega's serial port uses)