Error building ds18x20.py with no local changes

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
manseekingknowledge
Posts: 61
Joined: Sun Oct 29, 2017 5:14 pm

Error building ds18x20.py with no local changes

Post by manseekingknowledge » Sun Oct 29, 2017 5:33 pm

I've been using this Adafruit guide which uses a Vagrant VM for building:

https://learn.adafruit.com/building-and ... 6?view=all

This installs esp-open-sdk V2.0.0_16_08_10 and checks out MicroPython to the tip of master which is 24c8eda744e6c13866d70caec1b5c316caee64ac at this time. I successfully build at that point with no local changes. I then checked out to tag 1.9.2 (which was before the addition of the "ports" directory) and built successfully again with no local changes. After this I checked out to the tip of master again (same commit as my first successful build) and attempted to build again with no local changes, but I keep getting the error seen below:

vagrant@vagrant-ubuntu-trusty-64:~/micropython/ports/esp8266$ make
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
MPY modules/ds18x20.py
Traceback (most recent call last):
File "modules/ds18x20.py", line 1
SyntaxError: invalid syntax
make: *** [build/frozen_mpy/ds18x20.mpy] Error 1

I have cleaned and rebuilt everything I know how to clean and rebuild, but I can't figure out what is causing this. Any guidance would be appreciated.

manseekingknowledge
Posts: 61
Joined: Sun Oct 29, 2017 5:14 pm

Re: Error building ds18x20.py with no local changes

Post by manseekingknowledge » Sun Oct 29, 2017 9:57 pm

I figured out the problem, but my solution is not optimal. I had set up Vagrant VM to share the micropython directory to my Windows machine where I was thing planning to use SmartGit to track my changes to MicroPython. It seems there are (at the least) some time stamp issues and possibly also some line ending issues which do not show up as changes in SmartGit. They do show up as modifications and type changes using the Git command line in Vagrant though. My temporary solution is to not share the micropython directory from the Vagrant VM and instead have a sibling directory which is shared to Windows and will contains the modules I want to freeze. I then have a script in the Vagrant VM which copies all of the modules I want to freeze into the ports/esp8266/modules directory. An even easier solution I think is to just scrap the Vagrant VM and Windows when building MicroPython and just run Linux native.

Post Reply