Closed khatmodeniraj closed 6 years ago
Hi,
Thanks for the issue. You are right and info in readme was outdated regarding python=2.7. Currently it mostly compatible with py3.
to run it with py2.7 you can try to replace code in /analyzer/confluence/confluenceposter.py with
import xmlrpclib
import logging as log
WIKI_URL = None
WIKI_USER = None
WIKI_PASSWORD = None
WIKI_SPACE = None
WIKI_ALL_PAGE = None
class ConfluenceError(Exception):
pass
class ConfluencePoster(object):
def __init__(self, base_url, username, password):
self._client = xmlrpclib.ServerProxy(base_url + '/rpc/xmlrpc')
self._username = username
self._password = password
def login(self):
try:
self._token = self._client.confluence2.login(
self._username, self._password)
except xmlrpclib.Fault as e:
if 'AuthenticationFailedException' in e.faultString:
raise ConfluenceError('Confluence login failed.')
def logout(self):
self._client.confluence2.logout(self._token)
def move_page(self, child, parent, dest='append'):
self._client.confluence2.movePage(
self._token, child['id'], parent['id'], dest)
def get_page(self, space, page_name):
return self._client.confluence2.getPage(self._token, space, page_name)
def get_children(self, pageid):
return self._client.confluence2.getChildren(self._token, pageid)
def post_page(self, page):
self._client.confluence2.storePage(self._token, page)
def prepend_page(self, space, page_name, xhtml):
page = self.get_page(space, page_name)
page['content'] = page['content'] + xhtml
self.post_page(page)
def prepend_page_max_entries(self, space, page_name, xhtml, max_entries,
separator):
page = self.get_page(space, page_name)
pos = 0
separator_len = len(separator)
remaining_entries = max_entries - 1
while remaining_entries > 0:
pos = page['content'].find(separator, pos)
if pos == -1:
break
pos += separator_len
remaining_entries -= 1
else:
page['content'] = page['content'][:pos]
page['content'] = xhtml + page['content']
self.post_page(page)
def watchpage(self, page, user):
try:
self._client.confluence2.watchPageForUser(
self._token, page['id'], user)
except:
log.warning('can not add user {}'.format(user))
# raven_client.captureException()
pass
def get_watcher(self, page):
# returns list of dictionarys
watcher_list = self._client.confluence2.getWatchersForPage(
self._token, page['id'])
return [watcher['name'] for watcher in watcher_list]
Thanks for the details. I have following questions, can you please answer?
Requirements are showing minimal versions, it must work with newer. One thing I am not sure about is Django, could be problems with 2.0+ (but it works with 1.11)
I am able to setup everything on windows. Application is up and running.
When i tried to upload file but getting error "Object of type int32 is not JSON serializable"
I did some research around and came across following in Stackoverflow https://stackoverflow.com/questions/11942364/typeerror-integer-is-not-json-serializable-when-serializing-json-in-python
Can you please let me if you have any work around?
Can you plz give a part of information you try to upload
Please take a look at attached file. Sent you as txt as CSV is not allowed to upload.
I ll take a look
In first column you have data in exponential form (1.54E+12) probably due wrong save in Excel. Just set a proper data type and re-save again.
Thanks for taking a look. I tried again as you have mentioned with data in first column ... still got the same error. "Object of type int32 is not JSON serializable". i have attached new file. Can you please take a look?
If you have any working sample file, can you please share so i can take a look at my setup as well?
Fixed in https://github.com/innogames/JMeter-Control-Center/commit/538e0be30677738415013ef7661df5e166bd83e7
Please pull changes and try again
Awesome it worked. Thanks for fixing issue. I have started us Just one question: Can we get comparison table report between test1 and test2?
Few questions:
Insted of graph is it possible to get comparative report in tabular format? Why am i asking this .. because i tried data_example which you have provided. I made changes in few response_times same sheet and uploaded as run 2. But graphical data is not readable. I can understand as due to many urls input files, graph might have distorted. Added screen shot below with result files .. run1.txt run2.txt
Positive and Negative should show some data... am i right? PFA screen shot below for reference.
Thanks once again for helping to get it running.
Regarding comparison in tabular form.. this thing is somehow disappeared, lemme implement it again or resurrect. The positive/negative views are showing something if data got statistically significant change. So, this means if to change some small piece of data it could be ignored or so
As a fast solution here is the comparison table: https://github.com/innogames/JMeter-Control-Center/commit/5f1f8045d40bd72534af232f627a6e9f62ca3d2d Could be improved of course afterwards, just tell me how it should look like :) Pull again please
Thanks once again :) I was able to get difference. Attaching screen shot for the same.
Hi,
I am setting up tool on Windows 10 and followed all the steps which you have mentioned. But i am getting"ImportError: No module named xmlrpc" when i execute manage.py makemigrations. I looked over the net and came across one post which says "The answer is that the module xmlrpc is part of python3, not python2.x".
Requirement txt says use python=2.7 and it doesn't contain anything related to xmlrpc . Kindly let me know in case i am not not following correct steps.