-
Notifications
You must be signed in to change notification settings - Fork 81
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
Exception TypeError: 'expected string or Unicode object, NoneType found' #50
Comments
Hi, try to check this in python 3.x version. |
tnx @mynever dear ,My problem was solved with python3.x but i using python 2.7 . |
truly saying, i've checked this oid in my enviroment.
Try to check your versions of easysnmp and python 2.7. |
hi @mynever , tnx for reply |
btw, u can also try this one fork |
@saeedghx68 Did you encounter this error while attempting to multithread your code? |
Hi @kamakazikamikaze |
same error occurred to me(ubuntu16.04, python 2.7.9), when i use multiprocessing.Queue in a sub-tread. |
This is similar to #34 where multi-threading does not work properly. Unfortunately I have not yet been able to look into these as they are currently low priority. @AyoCross I would need to see some sample code to understand how you're using it. I assume that you're sharing sessions rather than results? When I was using using @saeedghx68 I would need to see a sample of the code you use as well. You say that this is not an issue in Python 3 but it is a problem in Python 2? I'm trying to understand how the |
@AyoCross Are you using v0.2.4 or the latest commit? I'm able to duplicate this while running tests on Raspbian Jessie and macOS, but Mint/Ubuntu is returning just fine |
@kamakazikamikaze my error occurred when i put unserializable object into Queue, not because easysnmp....sorry |
@kamakazikamikaze THX, that helps me a lot. |
@mynever I think the reason why you may have had that issue is that your MIBs weren't loaded fully in the threads. I came across this error myself when I tried using the dotted notation, ex. If you were having success in the main thread using dot-notation without specifying type, but not in a sub-thread, perhaps it's an environment variable that isn't set when threads are created, therefore your snmp.conf file and MIBs are not being loaded? There's too much going on to say for certain, but that would be my best guess. |
Hi I test this code
I gave this error:
Exception TypeError: 'expected string or Unicode object, NoneType found' in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
The text was updated successfully, but these errors were encountered: