<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on Servicios Rogeliowar</title><link>https://blog.serviciosrogeliowar.com/en/tags/python/</link><description>Recent content in Python on Servicios Rogeliowar</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Rogelio Guerra Riverón</copyright><lastBuildDate>Mon, 04 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.serviciosrogeliowar.com/en/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>AUTH LOGIN manual in Python with smtplib: special characters and error 535</title><link>https://blog.serviciosrogeliowar.com/en/posts/auth-login-manual-en-python-con-smtplib-caracteres-especiales-y-error-535/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/auth-login-manual-en-python-con-smtplib-caracteres-especiales-y-error-535/</guid><description>&lt;h2 class="relative group"&gt;The Problem
 &lt;div id="the-problem" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-problem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A few days ago I tried to automate sending emails from my home server. Nothing complicated: a Python script with smtplib to send notifications. The problem came when I configured a password with special characters: &lt;code&gt;MiPasw0rd$Ñ&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;import&lt;/span&gt; smtplib
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server &lt;span style="color:#f92672"&gt;=&lt;/span&gt; smtplib&lt;span style="color:#f92672"&gt;.&lt;/span&gt;SMTP(&lt;span style="color:#e6db74"&gt;&amp;#39;mail.example.com&amp;#39;&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;587&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server&lt;span style="color:#f92672"&gt;.&lt;/span&gt;starttls()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;server&lt;span style="color:#f92672"&gt;.&lt;/span&gt;login(&lt;span style="color:#e6db74"&gt;&amp;#39;usuario@example.com&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;MiPasw0rd$Ñ&amp;#39;&lt;/span&gt;) &lt;span style="color:#75715e"&gt;# Error 535&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Result: &lt;code&gt;SMTPAuthenticationError: (535, b'5.7.8 Authentication credentials invalid')&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The strange thing is that the password was correct. I could access it manually without problems. Error 535 suggested authentication failures, but the real problem was in the encoding.&lt;/p&gt;</description></item><item><title>Smart Excel Import in Python: Flexible Column Detection and Heterogeneous Data Cleaning</title><link>https://blog.serviciosrogeliowar.com/en/posts/importacion-inteligente-de-excel-en-python-deteccion-flexible-de-columnas-y-limpieza-de-datos-heterogeneos/</link><pubDate>Mon, 04 May 2026 00:00:00 +0000</pubDate><guid>https://blog.serviciosrogeliowar.com/en/posts/importacion-inteligente-de-excel-en-python-deteccion-flexible-de-columnas-y-limpieza-de-datos-heterogeneos/</guid><description>&lt;p&gt;I&amp;rsquo;ve been working with Excel spreadsheets that arrive from different departments. Each one uses different column names, the data is dirty (phone numbers with notes, tax IDs mixed with text), and codes have inconsistent formats. Here I document the solution I built.&lt;/p&gt;

&lt;h2 class="relative group"&gt;The real problem
 &lt;div id="the-real-problem" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-real-problem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;I was receiving Excel files where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Columns called &amp;ldquo;NIF&amp;rdquo; in one, &amp;ldquo;CIF&amp;rdquo; in another, &amp;ldquo;Identification&amp;rdquo; in the third&lt;/li&gt;
&lt;li&gt;Phone numbers like &amp;ldquo;123-456-7890 (ext 5)&amp;rdquo;, &amp;ldquo;9876543210 - unavailable&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Tax IDs with dashes, spaces and varied letters&lt;/li&gt;
&lt;li&gt;Product codes with inconsistent prefixes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I couldn&amp;rsquo;t expect everyone to format the same way. I needed a system that was flexible.&lt;/p&gt;</description></item></channel></rss>