error message - linktree1.py (UrlNet-v0.90.07.02)

2 views
Skip to first unread message

Bruno Amaral

unread,
Nov 5, 2009, 9:40:31 AM11/5/09
to UrlNet Python Library
This is pretty straightforward, I am trying to run the linktree1.py
out-of-the-box I get the error message:

--error message---
Traceback (most recent call last):
File "/Users/brunoamaral/Desktop/Inbox/UrlNet-v0-1.90.07.02/UrlNet-
v0.90.07.02/examples/linktree1.py", line 117, in <module>
main()
File "/Users/brunoamaral/Desktop/Inbox/UrlNet-v0-1.90.07.02/UrlNet-
v0.90.07.02/examples/linktree1.py", line 49, in main
workingDir = os.path.join(baseDir,timestamp)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/posixpath.py", line 62, in join
elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

--end ---

I just updated my version of UrlNet, could this be caused by a mistake
doing that?

To update, I replaced the old urlnet folder, with the one from the new
version and I updated the urlnet.conf file

if anyone could point me in the right direction, it would be great.

-bruno


Bruno Amaral

www.brunoamaral.eu
ma...@brunoamaral.com
(+351) 91 287 58 56

Dale Hunscher

unread,
Nov 5, 2009, 4:17:00 PM11/5/09
to urlnet-pyt...@googlegroups.com
Bruno,

It sounds like one of two things:

- the file needs to be named urlnet.cfg , not urlnet.conf
- the directory folder in which the urlnet.cfg resides is not in the list of directories in the PATH environment variable.
 If that doesn't help, let me know.
----
Dale A. Hunscher, MSI
Michigan Institute for Clinical and Health Research
734-678-5178

Bruno Amaral

unread,
Nov 5, 2009, 5:44:20 PM11/5/09
to urlnet-pyt...@googlegroups.com
Dale everything seems to be ok.

here are the details:

 I am currently running URLnet on a mac and the PATH variable is set in the following way:
>>> sys.path
['', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages']

the location for urlnet.cfg is:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

URLnet's files are located at:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/urlnet

the file permisssions are as follows:
drwxr-xr-x   54 brunoama  brunoama  1836 Nov  5 21:28 urlnet
-rwxr-xr-x    1 brunoama  admin      835 Nov  4 12:10 urlnet.cfg

I tried running sitemap1.py and that example did output a file.


Bruno Amaral

www.brunoamaral.com

Dale Hunscher

unread,
Nov 5, 2009, 8:55:27 PM11/5/09
to urlnet-pyt...@googlegroups.com
Bruno,
If the one program works and not the other, there's something wrong with the example. I'll look into it tomorrow AM. Thanks for the detailed update.

----
Dale A. Hunscher, MSI
Michigan Institute for Clinical and Health Research
734-678-5178



Dale Hunscher

unread,
Nov 6, 2009, 11:02:06 AM11/6/09
to urlnet-pyt...@googlegroups.com
Bruno,

I looked into this earlier this AM and am baffled. I am working on an enhanced urlutils.py that will give us more information (and never return None for working directory even if the urlnet.cfg file can't be found). I finsihed but haven't tested and am tied up at work for most of the day. Can you send me 2 things when you get a chance:

1. Your urlnet.cfg file.
2. Your working copy of linktree.py.

BTW, if you just strip out all the stuff related to logging, the example should work.

Thanks,
Dale
----
Dale A. Hunscher, MSI
Michigan Institute for Clinical and Health Research
734-678-5178



Bruno Amaral

unread,
Nov 6, 2009, 11:44:30 AM11/6/09
to urlnet-pyt...@googlegroups.com
Hi Dale, 

here are the files. this version of linktree is the same one that comes with the zip file on the google code page.

please let me know if there's anything else I can do to help.

kind regards, 
urlnet.cfg
linktree1.py

Dale Hunscher

unread,
Nov 6, 2009, 11:55:58 AM11/6/09
to urlnet-pyt...@googlegroups.com
Thanks, I'll either get to this over lunch (soon!), later this evening or tomorrow.

----
Dale A. Hunscher, MSI
Michigan Institute for Clinical and Health Research
734-678-5178



Reply all
Reply to author
Forward
0 new messages