-
Notifications
You must be signed in to change notification settings - Fork 71
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
ISSUE: Unable to prepare setup for platform mail_and_packages.sensor: Platform not found #63
Comments
Are you running home assistant as root or as hass? |
It appears that there is an issue on your system preventing python packages being installed. This person had a similar issue and it appeared to be related with how they installed python 3.7. |
hass aka (homeassistant)
Correct
This is a vanilla buster lite installation following instructions from hass website. |
I see that the permission on your file are owned by root and are group root. Are the other files for the configuration also owned by root? |
I followed the instruction for rasp pi 3 from this page. Used Samba to copy the files over manually, added my details to the integration with the exception of changing the path to the home folder since it is different in this system installation. /config/www/mail_and_packages/ All sensors are showing. See if the path corrects your issue. Or if you used different installation instruction please post the link to the page. |
numpy isn't a requirement in 0.1.2 so use that version, which is the version on the master branch. |
Yes they are below are the two other directories. pi@hass:/home/homeassistant/.homeassistant/custom_components/mail_and_packages $ cd .translations/ and images folder... By comparison, here's another custom component I'm using and the permissions.
The guide you used is for hass.io it looks like. Here are the instructions I use:
I'll give this a try. |
This is why the recommended way is to use HACS to install. The files being owned by root should be fine since there's read access. |
Removed integration, deleted files, installed 1.2 and rebooted. Added integration, rebooted again and i still get the exact same issues as OP including numpy. This is the zip i used for .1.2 I did try hacs but ran into some goofy issues hence the manual route. |
Double checked imageio uses numpy, try giving this command a go: |
I flashed raspberry lite and used the instructions you provided to install manually within a venv. I also received this error. It occurs right after saving the integration settings. It appears to be an issue specific to raspberry pi. @firstof9 taking the current version from the repository produces this, there might be a dependency on numpy that hasn't been completely removed? Based on recommendation from other forums installing This fixes the initial error but other errors are produced on this platform, line 868. UnboundLocalError: local variable 'fp' referenced before assignment I've run out of time to go deeper, but still platform specific. I run hass in the same manner but on Ubunutu without this issue. |
This sounds like the try/catch had an error. When you have time can you check the log for a |
The fix for numpy related errors: |
Do you still get error messages "UnboundLocalError: local variable 'fp' referenced before assignment" as @moralmunky mentioned? |
I never got an error regarding 'fp' have you @ttaidapos ? |
The said error mentioned above I did not get. I was able to configure once and that was initially. After everything looked good, i removed the integration and re-added (reboots in between) so I can change the folder to look into in GMail since I was not able to find any file to edit my initial configuration. Every since, I'm not able to get it working again even with using the default "inbox" folder. Below is what i'm seeing. During the integration add, all i'm getting is "unknown error" in red letters. P.S I'm on hass 107.5 `Log Details (ERROR) Error handling request |
This error means the hostname isn't correct. Check what you are putting in the host, if it's Gmail make sure you are putting |
You're absolutely right, so sorry for this novice error. This is what happens when you try to plow through troubleshooting. Couldn't find this anywhere else, can you use other labels (folders) in GMail besides "inbox". I've having a hell of a time getting it to work. |
Step 2 has a drop down to select your labels. It pulls your folders list from the server itself now, for Gmail labels act as folders. |
Not sure I understand. I created a gmail label named "Mail and Packages". Inputting that in the configuration screen doesn't seem to work. Never mind, wrapped it in quotes and that did the trick. Thank you everyone! |
Sounds like you are on an older version. The folder option was changed to a drop down menu that provides a list of the folders found in your mailbox. |
Also, was your issue running on the pi fixed by using another version of the integration or by installing the suggested package? |
Installing suggested package. |
To be fair, the 0.1.3 releases are marked as betas. I think once the Yahoo mail thing is sorted it should be good enough for everyone. |
That if i recall is fixed in the beta |
Cool thanks! Also, seems like USPS Mail is counting not only mail but packages as well, unless that's intended? |
The USPS Mail sensor should only be counting the number of mail pieces from the informed delivery email, no packages. Can you show what you are seeing? |
Confirmed this was a goof on the USPS side. Ignore. |
Describe the bug
Manual install will not create sensors :(. No sensors are getting created for any of the carriers.
Environment (please complete the following information):
Logs
Mar 14 22:44:52 hass hass[790]: 2020-03-14 22:44:52 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform mail_and_packages.sensor: Platform not found (
Mar 14 22:44:52 hass hass[790]: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Mar 14 22:44:52 hass hass[790]: Importing the numpy c-extensions failed.
Mar 14 22:44:52 hass hass[790]: - Try uninstalling and reinstalling numpy.
Mar 14 22:44:52 hass hass[790]: - If you have already done that, then:
Mar 14 22:44:52 hass hass[790]: 1. Check that you expected to use Python3.7 from "/srv/homeassistant/bin/python3",
Mar 14 22:44:52 hass hass[790]: and that you have no directories in your PATH or PYTHONPATH that can
Mar 14 22:44:52 hass hass[790]: interfere with the Python and numpy version "1.18.1" you're trying to use.
Mar 14 22:44:52 hass hass[790]: 2. If (1) looks fine, you can open a new issue at
Mar 14 22:44:52 hass hass[790]: https://github.com/numpy/numpy/issues. Please include details on:
Mar 14 22:44:52 hass hass[790]: - how you installed Python
Mar 14 22:44:52 hass hass[790]: - how you installed numpy
Mar 14 22:44:52 hass hass[790]: - your operating system
Mar 14 22:44:52 hass hass[790]: - whether or not you have multiple versions of Python installed
Mar 14 22:44:52 hass hass[790]: - if you built from source, your compiler versions and ideally a build log
Mar 14 22:44:52 hass hass[790]: - If you're working with a numpy git repository, try
git clean -xdf
Mar 14 22:44:52 hass hass[790]: (removes all files not under version control) and rebuild numpy.
Mar 14 22:44:52 hass hass[790]: Note: this error has many possible causes, so please don't comment on
Mar 14 22:44:52 hass hass[790]: an existing issue about this - open a new one instead.
Mar 14 22:44:52 hass hass[790]: Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory
Mar 14 22:44:52 hass hass[790]: ).
Screenshots
none
Additional context
Followed the readme to the 't' using the manual installation. Below is the component directory and permissions.
pi@hass:/home/homeassistant/.homeassistant/custom_components/mail_and_packages $ ls -lha
total 60K
drwxr-xr-x 3 root root 4.0K Mar 14 22:06 .
drwxr-xr-x 4 root root 4.0K Mar 14 12:20 ..
-rw-r--r-- 1 root root 4.3K Mar 3 21:34 config_flow.py
-rw-r--r-- 1 root root 1.2K Mar 3 21:34 const.py
-rw-r--r-- 1 root root 1.6K Mar 3 21:34 init.py
-rw-r--r-- 1 root root 274 Mar 3 21:34 manifest.json
-rw-r--r-- 1 root root 28K Mar 3 21:34 sensor.py
drwxr-xr-x 2 root root 4.0K Mar 3 21:34 .translations
The text was updated successfully, but these errors were encountered: