Opened 2 years ago

Closed 15 months ago

#28505 closed defect (invalid)

Non-ASCII character in file

Reported by: zimmerma Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: misc Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

with Sage 8.8 (the version shipped with Debian):

$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.8, Release Date: 2019-06-26                     │
│ Using Python 2.7.15. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
sage: from scipy.stats import norm
   File "/usr/local/SageMath/local/lib/python2.7/site-packages/scipy/stats/_continuous_distns.py", line 3345
     pp. 1–13, 1997.
                    ^
SyntaxError: Non-ASCII character '\xe2' in file /usr/local/SageMath/local/lib/python2.7/site-packages/scipy/stats/_continuous_distns.py on line 3346, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

The following line should be added in the file:

# -*- coding: utf-8 -*-

Same for _stats_mstats_common.py

Change History (9)

comment:1 Changed 2 years ago by chapoton

Works fine with python3-built sage. Time to switch ?

Last edited 2 years ago by chapoton (previous) (diff)

comment:2 Changed 21 months ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:3 Changed 20 months ago by mkoeppe

Is this fixed with #28154?

comment:4 Changed 20 months ago by chapoton

Works fine for me.

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.1.beta0, Release Date: 2020-01-10               │
│ Using Python 3.7.3. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: from scipy.stats import norm
sage: 

comment:5 Changed 20 months ago by zimmerma

I will try with Sage 9.0, if I manage to compile it from source on my machine, which was not the case for 8.8 and 8.9. See #28768.

comment:6 Changed 17 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

comment:7 Changed 15 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

Likely outdated after our switch to Python 3.

comment:8 Changed 15 months ago by zimmerma

  • Status changed from needs_review to positive_review

I confirm from scipy.stats import norm works with 9.0.

comment:9 Changed 15 months ago by chapoton

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.