DebugAH

How to Solve Your Programmer Error

Skip to content
  • Home
  • Linux
  • JAVA
  • Python
  • Javasript
  • MYSQL
  • Windows
  • Error

Python Error: TypeError: string argument without an encoding

Error reporting: Server_Socket.sendto (bytes (s), addr)

Modify: Server_socket.sendto(bytes(s.encode(‘utf-8’)), addr)   Then you can communicate successfully

in fact, it’s strange. I never reported an error before. Later, I changed the environment from Python 2.7 to Python 3.5   ~~

Similar Posts:

  • python TypeError: an integer is required
  • Python Error: Socket TypeError: a bytes-like object is required, not ‘str’ [How to Solve]
  • python 3.6 socket tcp Connect TypeError: a bytes-like object is required, not ‘str’
  • C++ Error: Run-Time Check Failure #2 – Stack around the variable ‘cc’ was corrupted.
  • Programming udp sockets in python
  • Error reporting and resolution of Python 3 using binascii method
  • [Solved] Typeerror: incorrect padding occurred in python3 Base64 decoding
  • AttributeError: ‘NoneType’ object has no attribute ‘split’ [How to Solve]
  • UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-1:
  • Error in import torch under linux environment

This entry was posted in Python and tagged Python, TypeError: string argument without an encoding on October 12, 2021 by Robins.

Post navigation

← R Language Error: rowMeans(new1) : ‘x’ must be an array of at least two dimensions If conditional statement in Bash reports an error [: missing `] ‘ →

Recent Posts

  • [Solved] Win-KeX/wsl2/kali Startup Error: A fatal error has occurred and VcXsrv will now exit.
  • [Solved] samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file
  • k8s Error: [ERROR FileAvailable–etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
  • [Solved] NoSuchMethodError: org.springframework.boot.web.servlet.error.ErrorController.getErrorPath
  • [Solved] flink web ui Submit Task Error: Server Respoonse Message-Internal server error
  • Mysql Error: 1140 – In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column ‘a.store’; this is incompatible with sql_mode=only_full_group_by
  • [Solved] Mybatis multi-table query error: Column ‘id’ in field list is ambiguous
  • [Solved] fluentd Log Error: read timeout reached
  • [Solved] xgboost Load Module File Error
  • [Solved] npm install Error: github requires permissions, Permission denied (publickey)

Tags

  • )
  • android
  • android studio
  • CentOS
  • centos7
  • chrome
  • DebugAH
  • django
  • docker
  • eclipse
  • git
  • github
  • go
  • hadoop
  • Hive
  • IDEA
  • ios
  • java
  • jenkins
  • Linux
  • Mac
  • maven
  • MyBatis
  • mysql
  • nginx
  • No module named XXX error
  • npm
  • Oracle
  • php
  • pip
  • pycharm
  • Python
  • Python TypeError
  • redis
  • shell
  • spring
  • springBoot
  • ssh
  • SVN
  • tensorflow
  • tomcat
  • ubuntu
  • vue
  • Windows
  • Yum
Proudly powered by WordPress