umqtt.robust on Wemos - mqtt

I am trying to install micropython-umqtt.robust on my Wemos D1 mini.
The way i tried this is as follow.
I use the Thonny editor
I have connected the wemos to the internet.
in wrepl type:
import upip
upip.install('micropython-umqtt.simple')
I get the folowing error: Installing to: /lib/
Error installing 'micropython-umqtt.simple': Package not found, packages may be partially installed
upip.install('micropython-umqtt.robust')
I get the folowing error: Error installing 'micropython-umqtt.robust': Package not found, packages may be partially installed
Can umqtt be installed on Wemos D1 mini ? if yes how do I do this ?

Thanks for your help Reilly,
The way I solved it is as follow. With a bit more understanding of mqtt and micropython I found that the only thing that happens when you try to install umqtt simple and umqtt robust,is that it makes in de lib directory of your wemos a new directory umqtt. Inside this directory it installs two files robust.py and simple.py. While trying to install them I kept having error messages. But I found a GitHub page for these two files, so I copied these files. Made the umqtt directory within the lib directory and in this umqtt directory I pasted the two copied files. Now I can use mqtt on my wemos.

I think the MicroPython build available from micropython.org already bundles MQTT so no need to install it with upip. Try this directly from the REPL:
from umqtt.robust import MQTTClient
or
from umqtt.simple import MQTTClient
and start using it from there
mqtt = MQTTClient(id, server, user, password)

Related

No Module Named PyQt5 and Pyside2 Error While Trying to open rqt

I've been trying to use the ROS(Robot Operating System) using this page:
Tutorial page
In the link it makes you use turtle sim it seemed to work fine with me without any errors.
In the 4th step(install rqt),i get this error:
`INPUT: RQT
OUTPUT: ImportError for 'pyqt': No module named 'PyQt5'
ModuleNotFoundError: No module named 'PyQt5'
ModuleNotFoundError: No module named 'PySide2'`
There was more lines of error but it seemed irrelevant to me because it only says file names.
I'm using python version 3.8.3 and qt version 5.12.12.
I downloaded the qt manually in their website.Didn't use:
pip install PyQt5
And i don't exactly remember now but someone said something about local files of pyhton but i had none of them:
screenshot of C:\Users\Boran\AppData\Local\Programs
It supposed to be Pyhton files in here.
Also there is no problem about python it works fine and i used talker and listener(pyhton coded applications of ROS.) and they worked fine.
I solved the problem by installing graphviz.It appears that to run rqt i had to install graphviz.

Error on installing the tidyverse and ggplot2 packages

I am seeing the following error when trying to install the tidyverse and ggplot2 R package
Error in install.packages : cannot open file 'C:/Users/dell user/Documents/R/win-library/4.1/filebad038967c5e/rlang/help/figures/rlang.png': Permission denied.
How can I go around this?
It happens because the path where you install them is restricted. To fix this issue:
Run the RStudio as Administrator. If this doesn't fix it:
Sometimes Windows Defender Ransomware Protection can cause issues. Add rsession.exe as an exception.
Change the R library folder (where your packages get installed) to a folder you have access to, like somewhere in your own Documents or Desktop or another path you control.

Xamarin forms Maps

im working on xamarin forms at the moment every time when i start a new xamarin form project i update the xamarin forms from the nuget package every things work fine until i started to work with maps and every time i install the xmarin.forms.maps after the install is finished i try to build my solution keeps throw 8 errors.droid
the problem is in the android platform only
Severity Code Description Project File Line Suppression State
Error Please install package: 'GPS Base' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Base' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Reason: File C:\Users\IBRAHIM\AppData\Local\Xamarin\zips\CAA441D76F04E0D57C4110F8A00CDA7A.zip is not a ZIP archive WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Unzipping failed. Please download https://dl-ssl.google.com/android/repository/google_m2repository_r24.zip and extract it to the C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content directory. WorkingWithMaps.Android
ive been stuck for 3 days now pleasee HELLPPPP MEEE OUT !!!
google play services base and basement folders are empty what should id
I ended up having to do it by hand... Here are the steps though
Download zip file (https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip)
Extra zip file
Go to folder you need the library for (let's say play-services-base)
Go to version (example: 8.1.0)
Rename file ending in .aar to .jar
Extract .jar file to a folder (I used 7Zip)
Copy all the contents of the folder
Go to "C:\Users{USER}\AppData\Local\Xamarin"
If doesn't exist, create needed folder (for "play-services-base" I created "Xamarin.GooglePlayServices.Base")
Created folder for version (Example: 8.1.0) and then a folder in that called "embedded"
Paste files from before into this folder
Go back to step 3 and keep repeating till all libraries are added
Ya it's a pain.... But it works
This is obviously not related to any SDK.The log clearly states the issue.
Your nuget packages are corrupted , this has happens when you try updating your xamarin forms to the latest version, along with other packages.
First
I would recommend starting a fresh project.
When installing Xamarin forms maps, ensure that all the version of the nuget package match, ensure there is no version mismatch. Do not update to the latest version. Find a mid-level stable version of the package needed and update to this. Now go to each Device specific component and check the references ensure there is no (!) under the referenced package.
Second
Navigate to your appdata directory
close visual studio.
C:\Users\john.doe\AppData\Local\ in this directory find the Xamarin folder.
Delete the "Xamarin" folder.
Open VS ===> Clean solution, and Rebuild the entire solution.
This will take a while, because you will re-download all the packages.
Viola!! Happy coding.
Thank you
i think you must have to update your SDK. then give proper permission for the map related implementation i hope that it will work fine in my case it is working good.

Pub does not download dependencies on Windows 7 after the update to lib v2 (SDK 0.3.1_r17328)

After the update to the version 0.3.1_r17328 of Dart SDK and Dart Editor I have some trouble to import some library particulary Args library. I have the same problem both directly importing Args or importing Web_ui where Args is one of the dependencies.
Here is my pubspec.yaml:
name: notes
description: A sample application
dependencies:
web_ui: 0.3.0+1
or:
name: notes
description: A sample application
dependencies:
args: 0.3.1+1
Here is the error generate from build.dart
Unable to open file: C:/Users/Fabio/Dropbox/progetti/note/packages/args/args.dart'package:web_ui/component_build.dart': Error: line 25 pos 1: library handler failed
import 'package:args/args.dart';
'file:///C:/Users/Fabio/Dropbox/progetti/note/build.dart': Error: line 1 pos 1: library handler failed
import 'package:web_ui/component_build.dart';
I solved the problem. It seems that the Cache folder (Pub) has been corrupted.
I have deleted the folder Cache: C:\Users\<UserName>\AppData\Roaming\Pub
Then i run pub install from command line and it works.
Unfortunately, I was getting the same error with my windows XP machine.
In the end, I logged into my windows 7 machine and was able to
download the packages, zipped them up and pasted the libraries into my
windows XP dart editor. Success!
I had no reason to believe I had the exact proxy issue #shindokaku had as I am using my home computer.
I tried all the suggestions on deleting the .cache files, pub.lock files and the packages folder and retrying. I uninstalled dart editor and tried again. I also tried using the git resources to download web-ui and running commands through the command line to no avail
Including suggestions in this similar questions:
cannot-find-referenced-source-packages
is-there-a-workaround-for-pub-dependency-resolution-through-proxies
This problem has been haunting me over and over for a few weeks. I am not using Windows, so this answer is not intended to help the original poster who is using Windows 7.
If you are using Linux here are the steps I use to repair corrupted pub cache.
Go to the top level directory of your app. You should see at least pubspec.lock, pubspec.yaml, a folder named packages, and a folder named web.
Delete your pubspec.lock, and packages folder.
[Make sure you aren't storing your own libraries in the packages folder]
cd ~/dart/myApp/
rm -r packages
rm pubspec.lock
Now once you have removed these files:
pub cache repair
Note 1: if your dart-sdk is not in your systems $PATH, than you will want to use the absolute path to the sdk when using the above command. Comment if you need that explained.
Note 2: This is working solution with Dart 1.5.3. I have not tested this on earlier versions.
Try deleting your pubspec.lock file and packages directory in the root folder of the project. Then run pub install again, when things get wacky thats what I do.
You should try to run pub update. I have sometimes found that this doesn't work as expected from the editor, but generally works quite smoothly when called from the command line.

How to build muPDF for android (Need help)

i've been working on this for a while now but i'm still stuck. This is what i've done...
Installed Eclipse
Installed SDK, NDK
Created a project from an existing source... which i browsed to muPDF/android
Then i installed Cygwin to build the project
I used ndk-build to build the project by cygwin
Then i got an error that says ".../Downloads/mupdf-0.8.165/android/jni/mupdf.c:11:19: error: mupdf.
h: No such file or directory"
I've been finding a way to fix this but it keeps on having other new problems after and after. so i would like to ask for your help... plz
Thanks in advance... Best regards, Sirisub
In the directory above there is a script called build.sh that runs the Android.mk and other makefiles; all the locations in those makefiles are set to be run from that location.
However, there are lots of other problems, not all of which I've resolved yet; quick hints, though, you need the third-party libs like jpeg and so on in a directory called "thirdparty" in the same source location as the rest of mupdf (so as siblings of the android subdirectory) and some of the libs need you to produce config headers to make everything work!
I'm currently trying to work out how to link it all ....

Resources