Re: F38 - Which python asn1 library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trying to see what help (If any) I can offer despite knowing nothing
about the module in question....

(I'm not going to try to preserve the quoting as to who said what, but
rather will just respond to the instructions.)

> > The README for python3-pyasn1 says that it is the one that you would
> > get from "pip install pyasn1" so it should be the right one.

"pip3 install pyasn1" works for me without any apparent issue

> import asn1

This fails, as there is no such module.  "import pyasn1" succeeds.

But the instructions beyond this are rather incomplete.  While "import
pyasn1" succeeds, it doesn't appear to really import anything useful.
Looks like there are submodules that need to be imported instead.
Probably something along the lines of "from pyasn1.foo.bar import
encoder" (names are fictitious).

> asn1_enc.write(oid, asn1.Numbers.ObjectIdentifier)
> oid_bytes = asn1_enc.output()

These cannot work because there is no "asn1_enc" object.  The object
would need to be created first with something like "asn1_enc =
pyasn1.foo.bar.encoder()" (again, names are fictitious).  Only after
the object has been created can you access methods such as "write" or
"output".

So basically, the above is why it isn't working.  Your colleague (or
someone that knows the pyasn1 module) needs to provide more code.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux