Exception in thread: TypeError: 'NoneType' object is not subscriptable

Bug #846882 reported by Linus Hoppe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyneighborhood
Incomplete
Low
pyNeighborhood

Bug Description

Reported in https://answers.launchpad.net/pyneighborhood/+question/170801:

I am using Ubuntu 11.04, I can browse Windows shares using Gigolo and copy files from my fileserver running Server 2008.
Installed 0.5.1 using Synaptic ( the repository is still not updated), and could not browse Windows share ( file manager is Thunar)
Updated to 0.5.4, still cannot browse shares, the error is consistent after rebooting.
When I enter the URL, IP and share name, I get a generic error: TypeError: 'NoneType' object is not subscriptable

ed@whitebox:~/Desktop$ pyNeighborhood
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/pymodules/python2.7/pyneighborhood/browsing.py", line 56, in run
    workgroup, workgroupid = query_workgroup(master)
  File "/usr/lib/pymodules/python2.7/pyneighborhood/nmblookup.py", line 114, in query_workgroup
    return (workgroup, cursor.fetchone()[0])
TypeError: 'NoneType' object is not subscriptable

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/pyneighborhood/addwindow.py", line 113, in response_handler
    query_workgroup(ip, True)
  File "/usr/lib/pymodules/python2.7/pyneighborhood/nmblookup.py", line 114, in query_workgroup
    return (workgroup, cursor.fetchone()[0])
TypeError: 'NoneType' object is not subscriptable

Revision history for this message
Betz Stefan (encbladexp) wrote :

I need the Output of the following command to fix this bug, because i never used Windows Server 2008 at Home ;-)
nmblookup -A ipofyourserver

Changed in pyneighborhood:
importance: High → Low
status: New → Incomplete
Revision history for this message
ed (ed90210) wrote :

ed@whitebox:~/Desktop$ nmblookup -A 10.1.1.11
Unknown parameter encountered: "max log size"
Ignoring unknown parameter "max log size"
Unknown parameter encountered: "syslog"
Ignoring unknown parameter "syslog"
Unknown parameter encountered: "passdb backend"
Ignoring unknown parameter "passdb backend"
Unknown parameter encountered: "unix password sync"
Ignoring unknown parameter "unix password sync"
Unknown parameter encountered: "passwd program"
Ignoring unknown parameter "passwd program"
Unknown parameter encountered: "pam password change"
Ignoring unknown parameter "pam password change"
Unknown parameter encountered: "map to guest"
Ignoring unknown parameter "map to guest"
Unknown parameter encountered: "usershare allow guests"
Ignoring unknown parameter "usershare allow guests"
Unknown parameter encountered: "guest ok"
Ignoring unknown parameter "guest ok"
Unknown parameter encountered: "guest ok"
Ignoring unknown parameter "guest ok"
Node status reply from 10.1.1.11
 FILE <00> B <ACTIVE>
 MyInternalDomain <00> <GROUP> B <ACTIVE>
 FILE <20> B <ACTIVE>

 MAC Address = 00-00-00-00-00-00

Revision history for this message
Betz Stefan (encbladexp) wrote :

Please fix your /etc/samba/smb.conf, "testparm" is your friend!

Revision history for this message
ed (ed90210) wrote :

Testparm may be my friend, but what am I looking for as the problem - what needs to be fixed ? I was able to create a permanent mount of a remote Windows share ( I edited fstab and the mount is present after reboot). If there was a problem with smb.conf, wouldn't that have showed up when I tried to mount the Windows share?

Revision history for this message
Betz Stefan (encbladexp) wrote :

Testparm checks your smb.conf for syntax and context errors, and these should be fixed before we can take a look at your Problem. If you add a host or share to pyNeighborhood, we make a call to nmblookup (a tool for browsing your network) to retrieve host related informations like workgroup and so on

Revision history for this message
ed (ed90210) wrote :

Sorry about the delay, old Xubuntu PC died, set up new PC with Xubuntu 11.04
1. Testparm results:
ed@whitebox:~/Desktop$ testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[netlogon]"
Processing section "[profiles]"
Processing section "[printers]"
Processing section "[pdf-documents]"
Processing section "[pdf-printer]"
Loaded services file OK.
WARNING: You have some share names that are longer than 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
Server role: ROLE_DOMAIN_PDC
2. Same error:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/pyneighborhood/addwindow.py", line 113, in response_handler
    query_workgroup(ip, True)
  File "/usr/lib/pymodules/python2.7/pyneighborhood/nmblookup.py", line 114, in query_workgroup
    return (workgroup, cursor.fetchone()[0])
TypeError: 'NoneType' object is not subscriptable

Press enter to see a dump of your service definitions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.