Skip to content

Commit 0247f31

Browse files
committed
Improve redown error handling
Ensure the redown debug files are written UTF-8 Fix one instance of smart quotes
1 parent f54e87d commit 0247f31

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

scripts/doc8_redown.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111

1212
def new_setattr(self, name, value):
1313
if name == "_raw_content" and value is not None:
14-
value = redown(value.decode("utf-8").replace("\r", "")).encode("utf-8")
15-
# Path(self.filename).with_suffix(".rd").write_text(value.decode("utf-8"))
14+
current_filename = self.filename
15+
try:
16+
value = redown(value.decode("utf-8").replace("\r", "")).encode("utf-8")
17+
# Path(self.filename).with_suffix(".rd").write_text(value.decode("utf-8"), encoding='utf-8')
18+
except Exception as e:
19+
print(f"Error processing file {self.filename}: {e}", file=sys.stderr)
20+
raise
1621
old_setattr(self, name, value)
1722

1823

source/docs/romi-robot/hardware.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ The Romi Robot Kit for FIRST comes pre-soldered and only has to be put together
2222
.. image:: images/hardware/assembly-motors.png
2323
:alt: Installing the motors on the Romi chassis.
2424

25-
3. Press the wheels onto the output shafts of the motors until the motor shaft is flush with the outer face of the wheel. One way to do this is to set the wheel on a flat surface and line the chassis up with it so that the flat part of the motors D-shaft lines up correctly with the wheel. Then, lower the chassis, pressing the motor shaft into the wheel until it contacts the surface.
25+
3. Press the wheels onto the output shafts of the motors until the motor shaft is flush with the outer face of the wheel. One way to do this is to set the wheel on a flat surface and line the chassis up with it so that the flat part of the motor's D-shaft lines up correctly with the wheel. Then, lower the chassis, pressing the motor shaft into the wheel until it contacts the surface.
2626

2727
.. image:: images/hardware/assembly-wheels.png
2828
:alt: Attaching the wheels on the Romi chassis.
2929

30-
4. Flip the chassis upside down and place the three rollers for the rear ball caster into the cutouts in the chassis. Place the 1 plastic ball on top of the three rollers. Then push the ball caster retention clip over the ball and into the chassis so the three legs snap into their respective holes.
30+
4. Flip the chassis upside down and place the three rollers for the rear ball caster into the cutouts in the chassis. Place the 1" plastic ball on top of the three rollers. Then push the ball caster retention clip over the ball and into the chassis so the three legs snap into their respective holes.
3131

3232
.. image:: images/hardware/assembly-caster-rear.png
3333
:alt: Installing the rear ball caster on the Romi chassis.

0 commit comments

Comments
 (0)