Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Module 'resources' has no attribute 'setrlimit' #5

Open
ahmedosman2001 opened this issue Jul 18, 2020 · 4 comments
Open

Module 'resources' has no attribute 'setrlimit' #5

ahmedosman2001 opened this issue Jul 18, 2020 · 4 comments

Comments

@ahmedosman2001
Copy link

Hi, I'm receiving this error, Anyone knows how I can fix it.
I tried "pip install resources" but this did not fix the error. Thanks

root@ubunto-VirtualBox:/home/ubunto/street-addresses# python run_end2end.py --xml /home/ubunto/street-addresses/example/nashik.osm --out_dir /home/ubunto/street-addresses/example --roadSeg_bin /home/ubunto/street-addresses/road_segmentor/bin/RoadConnectionLabelling
2020-07-18 21:54:37,263 [INFO] sys.version_info(major=2, minor=7, micro=17, releaselevel='final', serial=0)
2020-07-18 21:54:37,264 [INFO] {'input_tiff': None, 'xml': '/home/ubunto/street-addresses/example/nashik.osm', 'out_dir': '/home/ubunto/street-addresses/example', 'centre_row': None, 'roadSeg_bin': '/home/ubunto/street-addresses/road_segmentor/bin/RoadConnectionLabelling', 'centre_col': None}
2020-07-18 21:54:37,265 [INFO] Reading OSM file
2020-07-18 21:54:38,528 [INFO] Running end2end with OSM as input
2020-07-18 21:54:38,529 [INFO] Processing file:/home/ubunto/street-addresses/example/nashik.tif
2020-07-18 21:54:38,530 [INFO] Starting Road segmentator
Traceback (most recent call last):
File "run_end2end.py", line 147, in
main(args, out_fn, logger)
File "run_end2end.py", line 92, in main
safal_layers.RoadSegment()
File "/home/ubunto/street-addresses/util/safal_functions.py", line 36, in RoadSegment
resources.setrlimit(resource.RLIMIT_STACK, resource.RLIM_INFINITY)
AttributeError: 'module' object has no attribute 'setrlimit'

@KaunilD
Copy link
Contributor

KaunilD commented Jul 20, 2020

Hi @ahmedosman2001 ,
I am unable to reproduce this issue on my system.
for starters, can you send me the output of this command: pip freeze. I suspect that there is a mismatch in the package version between origin and the remote you've installed in your environment.

@ahmedosman2001
Copy link
Author

Hi @KaunilD, This is the output for "pip freeze"
root@ubunto-VirtualBox:/home/ubunto/street-addresses# pip freeze
3to2==1.1.1
asn1crypto==0.24.0
astroid==1.6.0
attrs==17.4.0
autobahn==17.10.1
Automat==0.6.0
backports.functools-lru-cache==1.4
beautifulsoup4==4.6.0
cbor==1.0.0
certifi==2020.6.20
chardet==3.0.4
click==6.7
colorama==0.3.7
configparser==3.5.0
constantly==15.1.0
cryptography==2.1.4
Cython==0.26.1
decorator==4.4.2
enum34==1.1.6
futures==3.2.0
GDAL==2.2.2
html5lib==0.999999999
hyperlink==17.3.1
idna==2.6
incremental==16.10.1
ipaddress==1.0.17
isort==4.3.4
keyring==10.6.0
keyrings.alt==3.0
lazy-object-proxy==1.3.1
logilab-common==1.4.1
lxml==3.6.4
lz4==0.10.1
mccabe==0.6.1
mpi4py==2.0.0
numpy==1.13.3
olefile==0.45.1
PAM==0.4.2
pbr==5.4.5
Pillow==5.1.0
py-ubjson==0.8.5
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycodestyle==2.6.0
pycrypto==2.6.1
pyflakes==1.6.0
pygobject==3.26.1
pylint==1.8.3
PyNaCl==1.1.2
pyOpenSSL==17.5.0
pyserial==3.4
python-resources==0.3
python-snappy==0.5
PyTrie==0.2
pyxdg==0.25
qrcode==5.3
requests==2.24.0
Rtree==0.8.3
scikit-learn==0.20.4
scipy==1.2.3
SecretStorage==2.3.1
service-identity==16.0.0
singledispatch==3.4.0.3
six==1.11.0
SQLAlchemy==1.3.18
sqlparse==0.3.1
Tempita==0.5.2
toml==0.10.1
trollius==2.0.1
Twisted==17.9.0
txaio==2.8.1
u-msgpack-python==2.1
urllib3==1.25.9
webencodings==0.5
wrapt==1.9.0
wsaccel==0.6.2
zope.interface==4.3.2

@KaunilD
Copy link
Contributor

KaunilD commented Jul 21, 2020

Found the issue. As of Jan 01, the resource module will raise an error as they have dropped support for py2.7. I am working on the upgrade to python 3.6.9 and OpenCV's latest stable release. Will keep you updated. Thank you for catching this @ahmedosman2001 .

@KaunilD
Copy link
Contributor

KaunilD commented Jul 23, 2020

Please follow r2.0 here: https://github.com/KaunilD/street-addresses/tree/r2.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants