SShortSingh.
Back to feed

Fixing pydub's 'No module named audioop' error on Python 3.13 and newer

0
·2 views

Developers upgrading to Python 3.13 or 3.14 may hit a ModuleNotFoundError when importing pydub, because the standard-library audioop module was removed in 3.13 after being deprecated under PEP 594. The original pydub 0.25.1, last released in March 2021, still relies on that module, so the break is a compatibility gap rather than a missing system dependency like ffmpeg. The article suggests staying on Python 3.12, where pydub still works, or installing the audioop-lts shim, which restores the module on 3.13+. Those wanting additional bug fixes can switch to the community fork pydub-lts, which depends on audioop-lts automatically on newer Python versions. The original pydub contributors are credited throughout.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Supabase 'infinite recursion' error from circular RLS policies, and how to fix it

A common Supabase problem appears when adding sharing, teams, or admin roles: pages that previously loaded return an 'infinite recursion detected in policy' error with code 42P17. The cause is row-level security policies that query the same table they protect, or two tables whose policies reference each other, forcing PostgreSQL into an endless evaluation loop. The author tested this against PostgreSQL 16.15 and notes the error can name the wrong table and may not reproduce in the SQL Editor, which bypasses policies for the table owner. The recommended fix is moving the lookup logic into a SECURITY DEFINER function in a private schema, which runs with privileges that skip the recursive policy check. Example functions and rewritten policies are provided for both the single-table admin case and the two-table sharing case.

0
ProgrammingDEV Community ·

Power BI Dashboards Help Sports Teams Turn Athlete Data Into Training Decisions

Sports teams, coaches, and fitness professionals are increasingly using analytics to assess athletes and refine training strategies. Every session and competition produces data on speed, stamina, workload, and recovery, which is hard to analyse manually. Microsoft Power BI can convert this raw information into interactive dashboards that reveal performance patterns. Such dashboards can track progress over time, monitor workload and injury history, and track health and recovery indicators. Experts note that these tools support monitoring and analysis, while medical diagnoses and return-to-play decisions remain the responsibility of qualified healthcare professionals.

0
ProgrammingDEV Community ·

Building a Safe Expression Parser to Replace eval Under a Strict CSP

A developer building a live graphing calculator could not use eval because the site's Content-Security-Policy forbids unsafe-eval, a restriction that also shields the site from XSS via user input. Instead, they wrote a roughly eighty-line expression parser that runs in four stages: tokenizing, inserting implicit multiplication, converting to reverse Polish notation via the shunting-yard method, and evaluating. The article highlights three common pitfalls: treating unary minus as ordinary subtraction (so -3^2 must equal -9), requiring right-associativity for exponentiation (so 2^3^2 equals 512), and recognizing implicit multiplication such as 2x without mistaking function names like sin(x) for variables. Parsing once and evaluating the compiled expression at each sample point keeps the plotting loop fast.

0
ProgrammingDEV Community ·

Cómo medir si un proceso mejoró de verdad, con cuatro indicadores clave

Un proceso solo puede considerarse mejorado si un indicador definido antes del cambio se mueve en la dirección esperada, sin que otros empeoren, y si ese resultado se mantiene con el tiempo. El artículo recomienda cuatro métricas para pymes: tiempo de ciclo, medido con la mediana y el percentil 90; retrabajo o errores como porcentaje de casos; pasos manuales por caso; y costo por transacción. Advierte que sin una línea base registrada, la supuesta mejora es solo una impresión del equipo. También señala que instalar una herramienta o recibir buenas opiniones no equivale a un resultado. Por último, subraya la importancia de contemplar el volumen de trabajo para interpretar correctamente cualquier variación.