Rotating electric machine comprising: - a stator arranged in a frame, said stator comprising coils; - a rotor comprising a body fixed to a rotation shaft rotatably mounted in the stator and rotating about an axis; - a first bearing supporting a driving side of a load of the rotation shaft; - a second bearing supporting a side opposite to the driving side of the load of the rotation shaft; - a front flange arranged at a first end of the frame and having in its central part a first housing for receiving the first bearing; - a rear flange arranged at a second end of the casing opposite the first end, and comprising in its middle part a second housing for receiving the second bearing; the front and rear flanges (110, 120) each comprising an inner face and an outer face, - a fixed metal support relative to the machine frame, - a magnetic position sensor for measuring the angular position of the rotor during rotation of the shaft, said position sensor comprising: - a rotating part comprising a magnet, fixed to the end of the side opposite the motor side of the load of the rotation shaft so as to be integral with the rotation shaft to the rotation of the shaft; - a fixed part comprising Hall effect sensors and means for transmitting the signals in output from the sensor, said fixed part facing the rotating part and being mounted on a fixed metal support connected to the machine frame; said rotating part being detached from the fixed part of the position sensor by means of a third bearing centred on the axis, said third bearing being fixed from one side to the opposite side end to the motor side of the load of the rotation shaft and on the other to the walls of an opening made in the metal support suitable for passing the end of the rotation shaft provided with the rotating part of the sensor, characterized in that the fixed metal support of the fixed part of the sensor has an internal face facing the rear flange and an external face facing the outside of the machine, said external face comprising a flat surface on the periphery of the opening of the metal support, said flat surface being in contact with the fixed part of the position sensor, the outer face of the metal support comprises an annular housing which receives the stationary part of the sensor, said annular housing comprising the flat surface, the latter being located at the periphery of the opening on the left at the end of the shaft including the position sensor magnet. - a stator arranged in a frame, said stator comprising coils; - a rotor comprising a body fixed to a rotation shaft rotatably mounted in the stator and rotating about an axis; - a first bearing supporting a driving side of a load of the rotation shaft; - a second bearing supporting a side opposite to the driving side of the load of the rotation shaft; - a front flange arranged at a first end of the frame and having in its central part a first housing for receiving the first bearing; - a rear flange arranged at a second end of the casing opposite the first end, and comprising in its middle part a second housing for receiving the second bearing; the front and rear flanges (110, 120) each comprising an inner face and an outer face, - a fixed metal support relative to the machine frame, - a magnetic position sensor for measuring the angular position of the rotor during rotation of the shaft, said position sensor comprising: - a rotating part comprising a magnet, fixed to the end of the side opposite the motor side of the load of the rotation shaft so as to be integral with the rotation shaft to the rotation of the shaft; - a fixed part comprising Hall effect sensors and means for transmitting the signals in output from the sensor, said fixed part facing the rotating part and being mounted on a fixed metal support connected to the machine frame; - a fixed metal support relative to the machine frame, - a magnetic position sensor for measuring the angular position of the rotor during rotation of the shaft, said position sensor comprising: - a rotating part comprising a magnet, fixed to the end of the side opposite the motor side of the load of the rotation shaft so as to be integral with the rotation shaft to the rotation of the shaft; - a fixed part comprising Hall effect sensors and means for transmitting the signals in output from the sensor, said fixed part facing the rotating part and being mounted on a fixed metal support connected to the machine frame; said rotating part being detached from the fixed part of the position sensor by means of a third bearing centred on the axis, said third bearing being fixed from one side to the opposite side end to the motor side of the load of the rotation shaft and on the other to the walls of an opening made in the metal support suitable for passing the end of the rotation shaft provided with the rotating part of the sensor, characterized in that the fixed metal support of the fixed part of the sensor has an internal face facing the rear flange and an external face facing the outside of the machine, said external face comprising a flat surface on the periphery of the opening of the metal support, said flat surface being in contact with the fixed part of the position sensor, the outer face of the metal support comprises an annular housing which receives the stationary part of the sensor, said annular housing comprising the flat surface, the latter being located at the periphery of the opening on the left at the end of the shaft including the position sensor magnet.