I fancied rebuilding the OpenEVSE WIFI GUE so I could customise it.
git clone GitHub - OpenEVSE/ESP8266_WiFi_v2.x: ESP8266 WiFi for OpenEVSE Version 2.x
cd ESP8266_WiFi_v2.x
git submodule update –init
cd gui
npm install
npm build
Now using Arduino IDE to compile I get
Error compiling:
In file included from sketch\web_server_static.cpp:14:0:
sketch\web_static/web_server_static_files.h:1:34: fatal error: web_server.assets.js.h: No such file or directory
#include "web_server.assets.js.h
However using Platform.io I get
*** [src\web_static\web_server.emoncms.jpg.h] TypeError : ord() expected a character, but string of length 0 found
Traceback (most recent call last):
File "C:\Users\fred\.platformio\packages\tool-scons\script\..\engine\SCons\Action.py", line 1209, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 61, in data_to_header
output += binary_to_header(file)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 42, in binary_to_header
output += "0x{:02x}, ".format(ord(byte))
TypeError: ord() expected a character, but string of length 0 found
*** [src\web_static\web_server.favicon-16x16.png.h] TypeError : ord() expected a character, but string of length 0 found
Traceback (most recent call last):
File "C:\Users\fred\.platformio\packages\tool-scons\script\..\engine\SCons\Action.py", line 1209, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 61, in data_to_header
output += binary_to_header(file)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 42, in binary_to_header
output += "0x{:02x}, ".format(ord(byte))
TypeError: ord() expected a character, but string of length 0 found
*** [src\web_static\web_server.favicon-32x32.png.h] TypeError : ord() expected a character, but string of length 0 found
Traceback (most recent call last):
File "C:\Users\fred\.platformio\packages\tool-scons\script\..\engine\SCons\Action.py", line 1209, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 61, in data_to_header
output += binary_to_header(file)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 42, in binary_to_header
output += "0x{:02x}, ".format(ord(byte))
TypeError: ord() expected a character, but string of length 0 found
*** [src\web_static\web_server.assets.js.h] AttributeError : 'str' object has no attribute 'decode'
Traceback (most recent call last):
File "C:\Users\fred\.platformio\packages\tool-scons\script\..\engine\SCons\Action.py", line 1209, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 59, in data_to_header
output += text_to_header(file)
File "D:\OPENENERGYMONITOR\ESP8266_WiFi_v2.x\scripts\extra_script.py", line 26, in text_to_header
original = source_fh.read().decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
Can anybody throw any light on these errors?
I’m obviously missing something