Skip to content
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

React update #115

Merged
merged 46 commits into from
Sep 29, 2020
Merged

React update #115

merged 46 commits into from
Sep 29, 2020

Conversation

Dakota-Peel
Copy link

Work in progress but its pretty big of a change so might as well start now for people to review

ahodges9 and others added 14 commits January 15, 2020 22:25
This reverts commit d7f07be and adds a default
for host.

When a lookup occurs for `$hostname` on my machine, ledfx crashes.
I do not keep the hostname of my machine in `/etc/hosts` nor in DNS fed by DHCP
leases.

```
Traceback (most recent call last):
  File "~/.local/bin/ledfx", line 8, in <module>
    sys.exit(main())
  File "~/.local/lib/python3.7/site-packages/ledfx/__main__.py", line 88, in main
    ledfx = LedFxCore(config_dir = args.config)
  File "~/.local/lib/python3.7/site-packages/ledfx/core.py", line 42, in __init__
    port=port)
  File "~/.local/lib/python3.7/site-packages/ledfx/http.py", line 26, in __init__
    host = socket.gethostbyname(socket.gethostname())
socket.gaierror: [Errno -2] Name or service not known
```

This change will resolve an inconsistency in behavior.

While the vast majority of cases resolve `$hostname` to `127.0.0.1`, this may
resolve to the DHCP address or not at all, instead, if `/etc/hosts` and the
local resolver are set up just right.
…ff easier. working on letting dev server react app communicate with python back end in dev mode
…int errors, added . eslint and prettier configs for formating"
…nse on success, still working towards everything working again from the refactor
Add missing command for windows
Revert "auto-detect ip" and add default host
Copy link
Collaborator

@not-matt not-matt left a comment

Choose a reason for hiding this comment

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

All changes appear good 👍

getting an error on launch:

  File "C:\Users\mb\.conda\envs\ledfx\lib\site-packages\yaml\reader.py", line 89, in peek
    return self.buffer[self.pointer+index]
IndexError: string index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\mb\.conda\envs\ledfx\Scripts\ledfx-script.py", line 11, in <module>
    load_entry_point('ledfx', 'console_scripts', 'ledfx')()
  File "e:\mb\documents\python\ledfx\ledfx\__main__.py", line 88, in main
    ledfx = LedFxCore(config_dir = args.config)
  File "e:\mb\documents\python\ledfx\ledfx\core.py", line 24, in __init__
    self.config["default_presets"] = load_default_presets()
  File "e:\mb\documents\python\ledfx\ledfx\config.py", line 95, in load_default_presets
    return yaml.safe_load(file)

...

 File "C:\Users\mb\.conda\envs\ledfx\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 2184: character maps to <undefined>

@Dakota-Peel
Copy link
Author

I think i got the static files hosting fixed for the react updates finally should be good to merge now @not-matt want to check it out before the merge

@not-matt not-matt merged commit e6b1517 into ahodges9:dev Sep 29, 2020
Mattallmighty added a commit to Mattallmighty/LedFx-OLD that referenced this pull request Oct 17, 2020
Merge pull request ahodges9#115 from Dakota-Peel/react-update
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.

5 participants