Skip to content

Fixing error, WaveFile moved to audiocore #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2020
Merged

Conversation

fede2cr
Copy link
Contributor

@fede2cr fede2cr commented Jul 15, 2020

I was testing the new json library and with this particular branch of circuitpython, but also with the latest from main, i was getting the following error while testing with the PyPortal:

Traceback (most recent call last):
File "code.py", line 35, in
File "/lib/adafruit_pyportal.py", line 284, in init
File "/lib/adafruit_pyportal.py", line 282, in init
File "/lib/adafruit_pyportal.py", line 633, in play_file
AttributeError: 'module' object has no attribute 'WaveFile'

Checking the docs, it looks like WaveFile moved to audiocore.
This couple of line fixes the problem and allow the PyPortal object to be created, and example pyportal code now works ok.

@fede2cr
Copy link
Contributor Author

fede2cr commented Jul 15, 2020

Note: This is intended to be applied for a 6.x release. If you use it as is on 5.3.x it does not know the module audiocore.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we add audiocore to this list of mock imports in the docs conf.py file here:

autodoc_mock_imports = [
it might resolve the current actions issue.

@fede2cr
Copy link
Contributor Author

fede2cr commented Jul 15, 2020

I just added the change to fede2cr:master. I don't see github re-doing the checks after this commit/push. Not sure if I did something wrong, or am I just being impatient with github.

@fede2cr fede2cr requested a review from FoamyGuy July 15, 2020 15:28
@FoamyGuy
Copy link
Contributor

That is weird I see your new commit/push on your branch, but it's not showing up here.

As far as I can tell you did make that new commit / push correctly. My guess is perhaps github and/or the actions system is having some kind of issue at the moment. Hopefully it will resolve itself shortly.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thank you for making these updates to the new API.

It does work on some versions 5.3.0 and below. I tested it down to 5.0.0 and it was working correctly there as well.

@FoamyGuy
Copy link
Contributor

I did a bit more testing and it looks like 5.0.0 was the oldest version that this works with. On 4.1.2 it crashes because audiocore does not exist yet.

I think this is okay to merge and release now. When we release it we should probably bump the major version and make a note that it's incompatible with Circuit Python versions below 5.0.0.

I'm going to leave it for now to see if anyone has thoughts or objections but we can merge it soon if there are no concerns.

@FoamyGuy FoamyGuy requested a review from a team July 15, 2020 23:46
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks!

@tannewt tannewt merged commit f53287d into adafruit:master Jul 16, 2020
@tannewt
Copy link
Member

tannewt commented Jul 16, 2020

Also note, we no longer make 4.x bundles so folks won't get this version that way.

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 22, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_DS3231 to 2.4.0 from 2.3.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_DS3231#27 from jepler/calibration-and-temperature

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 to 1.5.0 from 1.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PCF8523#19 from jepler/calibration-registers

Updating https://github.com/adafruit/Adafruit_CircuitPython_PM25 to 1.0.2 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PM25#3 from dglaude/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.3.0 from 3.2.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#82 from fede2cr/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 3.2.2 from 3.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#44 from 2bndy5/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 1.3.0 from 1.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#8 from FoamyGuy/performance_boost

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.5.0 from 1.4.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#29 from brentru/update-cellular-3g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants