PyTuning
PyTuning copied to clipboard
src/constants.py fix: sympy.power.Pow needs to change to sympy.Pow
Current pypi version is breaking due to small change in sympy.
Python 3.9.0 (default, Dec 2 2020, 10:34:08)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from pytuning.scales import create_edo_scale
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-59d71819c0d7> in <module>
----> 1 from pytuning.scales import create_edo_scale
/usr/local/lib/python3.9/site-packages/pytuning/__init__.py in <module>
----> 1 from pytuning.scales import create_harmonic_scale, create_pythagorean_scale, create_edo_scale, \
2 create_quarter_comma_meantone_scale, create_euler_fokker_scale, create_equal_interval_scale
3 from pytuning.scale_creation import calculate_modes, find_best_modes
4
5 __all__=["create_harmonic_scale", "calculate_modes", "find_best_modes",
/usr/local/lib/python3.9/site-packages/pytuning/scales/__init__.py in <module>
----> 1 from pytuning.scales.harmonic import create_harmonic_scale
2 from pytuning.scales.pythagorean import create_pythagorean_scale
3 from pytuning.scales.edo import create_edo_scale #, calculate_edo_mode
4 from pytuning.scales.euler_fokker import create_euler_fokker_scale
5 from pytuning.scales.equal_interval import create_equal_interval_scale
/usr/local/lib/python3.9/site-packages/pytuning/scales/harmonic.py in <module>
8
9 import sympy as sp
---> 10 from pytuning.utilities import normalize_interval
11
12 def create_harmonic_scale(first_harmonic, last_harmonic, normalize=True, octave=2):
/usr/local/lib/python3.9/site-packages/pytuning/utilities.py in <module>
10 import itertools
11
---> 12 import pytuning.constants
13
14 __all__ = ["normalize_interval", "distinct_intervals", "get_mode_masks", "mask_scale", "mask_to_steps", \
/usr/local/lib/python3.9/site-packages/pytuning/constants.py in <module>
31
32 edo12_constructors = [
---> 33 (sp.power.Pow(2,sp.Rational(2,12)), "T"),
34 (sp.power.Pow(2,sp.Rational(1,12)), "s"),
35 ]
AttributeError: module 'sympy' has no attribute 'power'
Change sp.power.Pow to sp.Power in constants.py to fix