Jump to content

Hanabi-san

Member
  • Posts

    14
  • Joined

  • Last visited

Personal Information

  • 3D printer
    I have no 3D printer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Hanabi-san's Achievements

1

Reputation

  1. I Just realized that I asked a really similar question about 2 years ago. Back then, I could not solve the problem. However, now I was able to include the PyNacl library by unzipping the PyNacl wheel file of my operating system and including this folder in my project plugin folder. Then, by using your suggested method, I import the library and then Cura is able to load the library correctly. Thank you for your help! Cheers
  2. Thank you for your fast reply! I'm trying to import the PyNacl library (https://github.com/pyca/pynacl). When I use your suggested method, I get an error message saying, that PyNacl cannot find its own imports anymore. For instance, in the public.py file of the module, it calls "import nacl.bindings". But after I imported the modul in my project, I get an error message stating "No module named 'nacl'". Does that mean the PyNacl library is not compatible? Thanks and Cheers
  3. Hallo I have created a custom plugin which uses a library, which is not included in Cura yet. When I run Cura from source, I can add the plugin to Cura, since I imported the library in my locally installed python. But when I add the plugin to the Cura Application, it does not work (it's an extension plugin and won't show up in the extensions menu). I would like to be able to add the plugin directly to the Cura Application instead of having to run Cura from source, since I plan to use it on multiple devices and setting up Cura from source is a lot of work. How can I do this? Do I have to build the new library somehow and add it to the Cura Application? Thanks and Cheers
  4. @ghostkeeper Thank you, I realized however that the cryptography library is not integrated in the downloadable Cura app so far but only on the project on Github. It seems, that it is only going to be integrated in Cura 4.5. Therefore, I'll have to wait until Cura gets updated until I can use the library in my plugin.
  5. @ctbeke Alright, thank you! In that case, I'll wait until Cura 4.5 gets released.
  6. @ctbeke Thank you for your fast reply. I tried using the import statement like in your example, but it does not seem to work. When I checked inside my Cura 4.4.1 application's UM folder inside the lib folder, there exists no Trust.py file. Could it be, that so far the cryptography library is only integrated in the Uranium Github repository but not in the downloadable application of Cura 4.4.1?
  7. Hallo I've heard, that Cura 4.4 has a cryptography library integrated. However, I am unable to find this library in Cura's lib folder. Could someone tell me, how Cura's cryptography library is called and which import statement I could use to use it in my self-written Cura plugin? Thank you!
  8. I am unable to find the cryptography library already integrated in Cura 4.4. Does anyone know under which name I can find the cryptography library in Cura's lib folder or which import statement I have to use?
  9. Cool, I didn't realize cryptography is already implemented in the 4.4 build. Then I try using the existing libraries of Cura for my plugin. That's even better, because I don't have to include the source code of the library in my own plugin folder. @ghostkeeper and @ahoeben Thank you very much for providing me with so many examples. Even though I couldn't use them for my desired cryptography library, I'm sure I can take advantage of them again when I want to use different kinds of libraries.
  10. @ahoeben Great, thank you very much for the second example. I tried it, but unfortunately the result is still the same: For some files it works but for others not. I'm starting to feel like the problem lies in the kind of libraries I'm trying to use. I mainly want to use encryption libraries like pynacl. Could it be, that such libraries do not work well together with Cura?
  11. Quick update: I've just noticed that my problem seems to not have anything to do with the import statements in the library files. For some reason the import does work for some files in libraries and not for others but I couldn't find a pattern yet to what causes this problem.
  12. @ahoeben Thank you very much for your fast and detailed reply. Yeah, that makes sense. I will do so. I've also tried this approach in my plugin. However, I encountered the same problem as described above in my previous post: It doesn't work for files that import other files in the same library but works perfectly fine for files that don't. Do I perhaps miss some setup steps?
  13. @ghostkeeper Thank you very much for your quick and detailed answer. I've now added the Python library source code folder to my plugin folder and imported the needed files like you described. It works well for library files that do not import anything from the same library folder. However, e.g. if I want to import a file x.py from the library "abc" and the file x.py includes the import statement "from abc import y", then it does not work anymore. Do you know why this happens and what I can do against it?
  14. Hallo I'm writing a plugin for Cura 4.3. I would like to use some external libraries in my plugin. However, when I use those libraries, Cura cannot read my plugin anymore (I added my plugin project folder to the plugin folder in the Cura applications contents folder). I noticed there is a "lib" folder in Cura's Resources. Is this the right location to add external libraries? Do I have to do it manually, or is there another option? Or if I'm wrong, how do I import or install external libraries into Cura? Thank you in advance!
×
×
  • Create New...