rocketblast / rcon-troller

rcon-troller is a Python library for writing game server modifications.
GNU Affero General Public License v3.0
1 stars 1 forks source link

Unable to import the Listener class from rocketblast.rcon #3

Open edvinerikson opened 9 years ago

edvinerikson commented 9 years ago

When I try to import the Listener class, I get a import error.

Info:

Steps to reproduce:

Install Logs
D:\rcon-troller>cd venv/Scripts && activate && cd ../..
(venv) D:\rcon-troller>python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to src\Rocket_Blast_RCON_Troller.egg-info\requires.txt
writing src\Rocket_Blast_RCON_Troller.egg-info\PKG-INFO
writing namespace_packages to src\Rocket_Blast_RCON_Troller.egg-info\namespace_packages.txt
writing top-level names to src\Rocket_Blast_RCON_Troller.egg-info\top_level.txt
writing dependency_links to src\Rocket_Blast_RCON_Troller.egg-info\dependency_links.txt
reading manifest file 'src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt'
writing manifest file 'src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\bdist.win32\egg
creating build\bdist.win32\egg\rocketblast
creating build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\rcon\listener.py -> build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\rcon\plugin.py -> build\bdist.win32\egg\rocketblast\rcon
creating build\bdist.win32\egg\rocketblast\rcon\util
copying build\lib\rocketblast\rcon\util\validate.py -> build\bdist.win32\egg\rocketblast\rcon\util
copying build\lib\rocketblast\rcon\util\__init__.py -> build\bdist.win32\egg\rocketblast\rcon\util
copying build\lib\rocketblast\rcon\__init__.py -> build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\__init__.py -> build\bdist.win32\egg\rocketblast
byte-compiling build\bdist.win32\egg\rocketblast\rcon\listener.py to listener.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\plugin.py to plugin.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\util\validate.py to validate.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\util\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\rocketblast\__init__.py to __init__.pyc
installing package data to build\bdist.win32\egg
running install_data
creating build\bdist.win32\egg\data
copying data\GeoIP.dat -> build\bdist.win32\egg\data
copying data\GeoIPASNum.dat -> build\bdist.win32\egg\data
copying data\GeoLiteCity.dat -> build\bdist.win32\egg\data
creating build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\namespace_packages.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
rocketblast.__init__: module references __path__
rocketblast.rcon.listener: module references __file__
rocketblast.rcon.__init__: module references __path__
creating 'dist\Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg
creating d:\rcon-troller\venv\lib\site-packages\Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg
Extracting Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg to d:\rcon-troller\venv\lib\site-packages
Adding Rocket-Blast-RCON-Troller 0.1.1 to easy-install.pth file

Installed d:\rcon-troller\venv\lib\site-packages\rocket_blast_rcon_troller-0.1.1-py2.7.egg
Processing dependencies for Rocket-Blast-RCON-Troller==0.1.1
Searching for rocket-blast-rcon
Best match: rocket-blast-rcon [unknown version]
Downloading https://github.com/rocketblast/rcon/archive/master.zip#egg=rocket_blast_rcon
Processing master.zip
Writing c:\users\edvin\appdata\local\temp\easy_install-kaes3n\rcon-master\setup.cfg
Running rcon-master\setup.py -q bdist_egg --dist-dir c:\users\edvin\appdata\local\temp\easy_install-kaes3n\rcon-master\egg-dist-tmp-jatadn
zip_safe flag not set; analyzing archive contents...
rocketblast.__init__: module references __path__
rocketblast.rcon.__init__: module references __path__
Adding rocket-blast-rcon 0.1.1 to easy-install.pth file

Installed d:\rcon-troller\venv\lib\site-packages\rocket_blast_rcon-0.1.1-py2.7.egg
Searching for pygeoip
Reading https://pypi.python.org/simple/pygeoip/
Reading http://code.google.com/p/pygeoip/
Reading https://github.com/appliedsec/pygeoip
Best match: pygeoip 0.3.2
Downloading https://pypi.python.org/packages/source/p/pygeoip/pygeoip-0.3.2.tar.gz#md5=861664f8be3bed44820356539f2ea5b6
Processing pygeoip-0.3.2.tar.gz
Writing c:\users\edvin\appdata\local\temp\easy_install-gr6gkg\pygeoip-0.3.2\setup.cfg
Running pygeoip-0.3.2\setup.py -q bdist_egg --dist-dir c:\users\edvin\appdata\local\temp\easy_install-gr6gkg\pygeoip-0.3.2\egg-dist-tmp-ksrxqk
zip_safe flag not set; analyzing archive contents...
Adding pygeoip 0.3.2 to easy-install.pth file

Installed d:\rcon-troller\venv\lib\site-packages\pygeoip-0.3.2-py2.7.egg
Finished processing dependencies for Rocket-Blast-RCON-Troller==0.1.1
(venv) D:\rcon-troller>

Python logs
(venv) D:\rcon-troller>python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from rocketblast.rcon import Listener
D:\rcon-troller\venv\lib\site-packages\rocket_blast_rcon_troller-0.1.1-py2.7.egg\rocketblast\rcon\__init__.py:4: RuntimeWarning: Parent module 'rocketblast.rcon' not found while handling absolute import
  from pkgutil import extend_path
D:\rcon-troller\venv\lib\site-packages\rocket_blast_rcon_troller-0.1.1-py2.7.egg\rocketblast\rcon\__init__.py:7: RuntimeWarning: Parent module 'rocketblast.rcon' not found while handling absolute import
 from listener import Listener
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\rcon-troller\venv\lib\site-packages\rocket_blast_rcon-0.1.1-py2.7.egg\rocketblast\rcon\__init__.py", line 7, in <module>
  from frostbite.frostbite import Client as FrostbiteClient
pythonImportError: No module named frostbite.frostbite
>>>
martindanielson commented 9 years ago

I have tried to reproduce the error twice now, but it is working on my end. I will keep the issue open and see if others are experiencing the same problem; and if we can narrow down why it is happening.

Please try to download the zip versions of both the repositories and install without virtualenv.

rcon

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Martin\Desktop\rcon-master>python setup.py install
running install
running bdist_egg
running egg_info
creating src\Rocket_Blast_RCON.egg-info
writing src\Rocket_Blast_RCON.egg-info\PKG-INFO
writing namespace_packages to src\Rocket_Blast_RCON.egg-info\namespace_packages.txt
writing top-level names to src\Rocket_Blast_RCON.egg-info\top_level.txt
writing dependency_links to src\Rocket_Blast_RCON.egg-info\dependency_links.txt
writing manifest file 'src\Rocket_Blast_RCON.egg-info\SOURCES.txt'
reading manifest file 'src\Rocket_Blast_RCON.egg-info\SOURCES.txt'
writing manifest file 'src\Rocket_Blast_RCON.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\rocketblast
copying src\rocketblast\__init__.py -> build\lib\rocketblast
creating build\lib\rocketblast\rcon
copying src\rocketblast\rcon\__init__.py -> build\lib\rocketblast\rcon
creating build\lib\rocketblast\rcon\frostbite
copying src\rocketblast\rcon\frostbite\connection.py -> build\lib\rocketblast\rcon\frostbite
copying src\rocketblast\rcon\frostbite\frostbite.py -> build\lib\rocketblast\rcon\frostbite
copying src\rocketblast\rcon\frostbite\packet.py -> build\lib\rocketblast\rcon\frostbite
copying src\rocketblast\rcon\frostbite\__init__.py -> build\lib\rocketblast\rcon\frostbite
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\rocketblast
creating build\bdist.win32\egg\rocketblast\rcon
creating build\bdist.win32\egg\rocketblast\rcon\frostbite
copying build\lib\rocketblast\rcon\frostbite\connection.py -> build\bdist.win32\egg\rocketblast\rcon\frostbite
copying build\lib\rocketblast\rcon\frostbite\frostbite.py -> build\bdist.win32\egg\rocketblast\rcon\frostbite
copying build\lib\rocketblast\rcon\frostbite\packet.py -> build\bdist.win32\egg\rocketblast\rcon\frostbite
copying build\lib\rocketblast\rcon\frostbite\__init__.py -> build\bdist.win32\egg\rocketblast\rcon\frostbite
copying build\lib\rocketblast\rcon\__init__.py -> build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\__init__.py -> build\bdist.win32\egg\rocketblast
byte-compiling build\bdist.win32\egg\rocketblast\rcon\frostbite\connection.py to connection.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\frostbite\frostbite.py to frostbite.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\frostbite\packet.py to packet.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\frostbite\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\rocketblast\__init__.py to __init__.pyc
creating build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON.egg-info\namespace_packages.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
rocketblast.__init__: module references __path__
rocketblast.rcon.__init__: module references __path__
creating dist
creating 'dist\Rocket_Blast_RCON-0.1.1-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing Rocket_Blast_RCON-0.1.1-py2.7.egg
creating c:\python27\lib\site-packages\Rocket_Blast_RCON-0.1.1-py2.7.egg
Extracting Rocket_Blast_RCON-0.1.1-py2.7.egg to c:\python27\lib\site-packages
Adding Rocket-Blast-RCON 0.1.1 to easy-install.pth file

Installed c:\python27\lib\site-packages\rocket_blast_rcon-0.1.1-py2.7.egg
Processing dependencies for Rocket-Blast-RCON==0.1.1
Finished processing dependencies for Rocket-Blast-RCON==0.1.1

C:\Users\Martin\Desktop\rcon-master>python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from rocketblast.rcon import FrostbiteClient as Client
>>> client = Client('192.0.0.1', 47200, 'secret')
>>> serverinfo = client.send(['serverinfo'])
>>> print serverinfo
['OK', 'Rocket Blast 03 Bank Job Conquest - rocketblast.com', '0', '64', 'TurfWarLarge0', 'MP_Bank', '0', '1', '2', '300', '300', '0', '', 'true', 'true', 'false', '81147', '81147', '192.0.0.1:27200', '', 'true', 'EU', 'ams', 'SE', '0', 'IN_GAME']
>>>

rcon-troller

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\Martin\Desktop\rcon-troller-master>python setup.py install
running install
running bdist_egg
running egg_info
creating src\Rocket_Blast_RCON_Troller.egg-info
writing requirements to src\Rocket_Blast_RCON_Troller.egg-info\requires.txt
writing src\Rocket_Blast_RCON_Troller.egg-info\PKG-INFO
writing namespace_packages to src\Rocket_Blast_RCON_Troller.egg-info\namespace_packages.txt
writing top-level names to src\Rocket_Blast_RCON_Troller.egg-info\top_level.txt
writing dependency_links to src\Rocket_Blast_RCON_Troller.egg-info\dependency_links.txt
writing manifest file 'src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt'
reading manifest file 'src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt'
writing manifest file 'src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib
creating build\lib\rocketblast
copying src\rocketblast\__init__.py -> build\lib\rocketblast
creating build\lib\rocketblast\rcon
copying src\rocketblast\rcon\listener.py -> build\lib\rocketblast\rcon
copying src\rocketblast\rcon\plugin.py -> build\lib\rocketblast\rcon
copying src\rocketblast\rcon\__init__.py -> build\lib\rocketblast\rcon
creating build\lib\rocketblast\rcon\util
copying src\rocketblast\rcon\util\validate.py -> build\lib\rocketblast\rcon\util
copying src\rocketblast\rcon\util\__init__.py -> build\lib\rocketblast\rcon\util
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\rocketblast
creating build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\rcon\listener.py -> build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\rcon\plugin.py -> build\bdist.win32\egg\rocketblast\rcon
creating build\bdist.win32\egg\rocketblast\rcon\util
copying build\lib\rocketblast\rcon\util\validate.py -> build\bdist.win32\egg\rocketblast\rcon\util
copying build\lib\rocketblast\rcon\util\__init__.py -> build\bdist.win32\egg\rocketblast\rcon\util
copying build\lib\rocketblast\rcon\__init__.py -> build\bdist.win32\egg\rocketblast\rcon
copying build\lib\rocketblast\__init__.py -> build\bdist.win32\egg\rocketblast
byte-compiling build\bdist.win32\egg\rocketblast\rcon\listener.py to listener.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\plugin.py to plugin.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\util\validate.py to validate.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\util\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\rocketblast\rcon\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\rocketblast\__init__.py to __init__.pyc
installing package data to build\bdist.win32\egg
running install_data
creating build\bdist.win32\egg\data
copying data\GeoIP.dat -> build\bdist.win32\egg\data
copying data\GeoIPASNum.dat -> build\bdist.win32\egg\data
copying data\GeoLiteCity.dat -> build\bdist.win32\egg\data
creating build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\namespace_packages.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying src\Rocket_Blast_RCON_Troller.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
rocketblast.__init__: module references __path__
rocketblast.rcon.listener: module references __file__
rocketblast.rcon.__init__: module references __path__
creating dist
creating 'dist\Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg
creating c:\python27\lib\site-packages\Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg

Extracting Rocket_Blast_RCON_Troller-0.1.1-py2.7.egg to c:\python27\lib\site-packages
Adding Rocket-Blast-RCON-Troller 0.1.1 to easy-install.pth file

Installed c:\python27\lib\site-packages\rocket_blast_rcon_troller-0.1.1-py2.7.egg
Processing dependencies for Rocket-Blast-RCON-Troller==0.1.1
Searching for pygeoip
Reading https://pypi.python.org/simple/pygeoip/
Reading http://code.google.com/p/pygeoip/
Reading https://github.com/appliedsec/pygeoip
Best match: pygeoip 0.3.2
Downloading https://pypi.python.org/packages/source/p/pygeoip/pygeoip-0.3.2.tar.gz#md5=861664f8be3bed44820356539f2ea5b6
Processing pygeoip-0.3.2.tar.gz
Writing c:\users\martin\appdata\local\temp\easy_install-fdiccm\pygeoip-0.3.2\setup.cfg
Running pygeoip-0.3.2\setup.py -q bdist_egg --dist-dir c:\users\martin\appdata\local\temp\easy_install-fdiccm\pygeoip-0.3.2\egg-dist-tmp-gblvh3
zip_safe flag not set; analyzing archive contents...
Adding pygeoip 0.3.2 to easy-install.pth file

Installed c:\python27\lib\site-packages\pygeoip-0.3.2-py2.7.egg
Searching for rocket-blast-rcon==0.1.1
Best match: rocket-blast-rcon 0.1.1
Processing rocket_blast_rcon-0.1.1-py2.7.egg
rocket-blast-rcon 0.1.1 is already the active version in easy-install.pth

Using c:\python27\lib\site-packages\rocket_blast_rcon-0.1.1-py2.7.egg
Finished processing dependencies for Rocket-Blast-RCON-Troller==0.1.1

C:\Users\Martin\Desktop\rcon-troller-master>python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from rocketblast.rcon import Plugin
>>> from rocketblast.rcon import Listener
>>>
martindanielson commented 9 years ago

Ok, an update.

It turns out that if you install rcon first and then rcon-troller it works. However, if you install rcon-troller first (or rely on it to install the rcon dependency) it breaks. At least a step closer to why the error appears.