Python Forum
"³" math cube symbol encoding
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"³" math cube symbol encoding
#1
Hello,

I am using the package pyuff to read a unv file.
I have the following error
Quote:UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 770: ordinal not in range(128)

After checking I figured out it is coming from
Quote:m³/s
, the cube symbol is not supported by ascii codecs (I believe it is ascii extended).

How can I fix this please.

Cheers.
Reply
#2
Use Unicode
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
(Mar-09-2018, 02:21 PM)wavic Wrote: Use Unicode
Would you please give some details. These are the lines I am using
Quote:py> import pyuff
py> f=pyuff.UFF('path to file...')
py> f.read_sets(0)
Reply
#4
pyuff module has no Unicode support.
Quote:An UFF file is a file that can have many data-sets of either ascii or binary
data where data-set is a block of data between the start and end tags ''____-1''
'' _ ''representing the space character). Refer to [1]_ and [2]_ for
more information about the UFF format.
Reply
#5
(Mar-09-2018, 03:48 PM)snippsat Wrote: '' _ ''representing the space character). Refer to [1]_ and [2]_ for
Thank you for your comment but I don't see how it is helping me. I am using the module to read an official unv file and it doesn't work because of the power symbol.
Reply
#6
The first question is which exact python statement and expression creates the error. Can you post the whole error traceback?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Decryption not working if key has same symbol like text Paragoon2 0 396 Nov-11-2023, 09:32 PM
Last Post: Paragoon2
  Convert Excel file into csv with Pipe symbol.. mg24 4 1,453 Oct-18-2022, 02:59 PM
Last Post: Larz60+
  math.log versus math.log10 stevendaprano 10 2,631 May-23-2022, 08:59 PM
Last Post: jefsummers
  Why getting ValueError : Math domain error in trig. function, math.asin() ? jahuja73 3 3,953 Feb-24-2021, 05:09 PM
Last Post: bowlofred
  ImportError: /home/pybind11_example.cpython-37m-x86_64-linux-gnu.so: undefined symbol chaitra 2 5,281 Feb-03-2021, 05:14 AM
Last Post: chaitra
  Take particular symbol from textbox help samuelbachorik 3 2,252 Apr-14-2020, 03:55 AM
Last Post: steve_shambles
  Hide symbol or characters in regular expression Gateux 0 2,332 Mar-21-2020, 10:25 AM
Last Post: Gateux
  loop through range until reach size and exclude specific symbol pino88 3 2,485 Sep-23-2019, 02:32 AM
Last Post: perfringo
  I'm having a problem with this cube root code Duc311003 2 2,995 May-16-2018, 07:13 PM
Last Post: buran
  Square and Cube roots. jarrod0987 2 5,586 Apr-13-2018, 09:30 PM
Last Post: casevh

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020