datacharts in reportlab - django

I am getting this error which running reportlab with django:
Error was: No module named datacharts
When I checked the
C:\Python26\Lib\site-packages\rlextra\graphics\guiedit folder I dont find datacharts.py but I only find datacharts.pyc and datacharts.pyo
For all other files, even py is there. I tried downloading rlextra again but py for datacharts is still not there.
Is this the right format or I am missing on anything which django is not able to find.

Have you read through the Reportlab installation instructions?
In particular, step 3 tells you how to test your rlextra installation, and step 4 mentions that you will need to install Python Windows extensions in order to use data-aware charts with a database.

Related

No module named 'django.conf.urls.defaults'

I upgraded from django 3.2.5 to django 4.0.4.
I know that this 'django.conf.urls.defaults' must be deprecated.
My problem is that I don't get this error in the development environment but when I push to production, it shows the error. Why is this so???
Also I tried to locate the file so that I can change that line of code to the correct one but could find it's location. It's giving me this path which I can't see how to get to (/workspace/.heroku/python/lib/python3.9/site-packages/django/conf/urls/__init__.py))
After trying all the possibles at my level , I had to revert to django 3.2.5

Installation of Spatialite with Django on windows 10

I am struggling to find out how to install spatialite for geodjango on windows but I don't know what I am doing wrong. I follow the instructions as per the django page https://docs.djangoproject.com/en/4.0/ref/contrib/gis/install/spatialite/ but the tutorial doesn't say what to do after getting the binarys of spatialite
I have tried to put them everywhere but every time I get the same error:
Exception Value:
Unable to load the SpatiaLite library extension as specified in your SPATIALITE_LIBRARY_PATH setting
I tried to put the mod_spatialite.dll file everywhere and try to set to SPATIALITE_LIBRARY_PATH but it seems I can't get the solution
Any suggestions would be appriciated
Thanks
Extracting the binary into Python installation folder eg: C:\Users\huy\AppData\Local\Programs\Python\Python39.
Then add SPATIALITE_LIBRARY_PATH = "mod_spatialite". This works for me.

Pabot - Unable to run parallel robotframework tests

So, I'm working on a robotframework test project, and the goal is to run several test suites in parallel. For this purpose, pabot was chosen as the solution. I am trying to implement it, but with little success.
My issue is: after installing Pabot (which, I might say, I did by cloning the project and running "setup.py install", instead of using pip, since the corporate proxy I'm behind has proven an obstacle I can't overcome), I created a new directory in the project tree, moved some suites there, and ran:
pabot --processes 2 --outputdir pabot_results Login*.robot
Doing so results in the following error message:
2018-10-10 10:27:30.449000 [PID:9676] [0] EXECUTING Suites.LoginAdmin
2018-10-10 10:27:30.449000 PID:400 EXECUTING Suites.LoginUser
2018-10-10 10:27:30.777000 PID:400 FAILED Suites.LoginUser
2018-10-10 10:27:30.777000 [PID:9676] [0] FAILED Suites.LoginAdmin
WARN: No output files in "pabot_results\pabot_results"
Output:
[ ERROR ] Reading XML source '' failed: invalid mode ('rb') or filename
Try --help for usage information.
Elapsed time: 0 minutes 0.578 seconds
Upon inspecting the stderr file that was generated, I have this message:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\robotframework-3.1a2.dev1-py2.7.egg\robot\running\runner.py", line 22, in
from .context import EXECUTION_CONTEXTS
ValueError: Attempted relative import in non-package
Apparently, this has to do with something from the runner.py script, which, if I'm not mistaken, came with the installation of robotframework. Since manually modifying that script does not seem to me the optimal solution, my question is, what am I missing here? Did I forget to do anything while setting this up? Or is this an issue of compatibility between versions?
This project is using Maven as the tool to manage dependencies. The version I am running is 3.5.4. I am using a Windows 10, 64bit system; I have Python 2.7.14, and Robot Framework 3.1a2.dev1. The Pabot version is 0.44. Obviously, I added C:\Python27 and C:\Python27\Scripts to the PATH environment variable.
Edit: I am also using robotframework-maven-plugin version 1.4.0.8, if that happens to be relevant.
Edit 2: added the error messages in text format.
I believe I've come across an issue similar when setting up parallel execution on my machine. Firstly I would confirm that pabot is installed using pip show robotframework-pabot.
Then you should define the directory your results are going to using -d.
I then modified the name of the -o to Output.xml to make it easy to identify.
This is a copy of the code I use. Runs optimally with 8 processes
pabot --processes 8 -d results -o Output.xml Tests
Seems that you stumbled on a bug in the prerelease version of robot framework (3.1a2.dev1).
Please install a release version of robot framework. For example 3.0.4.
Just in case anyone happens to stumble upon this issue in the future:
Since I can't use pip, and I tried a good deal of workarounds that eventually made things more unstable, I ended up saving my project and removing everything Python-related from my system, so as to allow me to install everything from scratch. In a Windows 10, 64bit system, I used:
Python 2.7.14
wxPython 2.8.12.1, win64, unicode, for py27
setuptools 40.2.0 (to allow me to use the easy_install command)
Robot Framework 3.0.4
robotremoteserver 1.1
Selenium2Library 3.0.0
and Pabot version 0.45.
I might add that, when installing the Selenium2Library the way I described above, it eventually tries to download some things from the pip repositories - which, if you have a proxy, will cause you trouble. I solved this problem by browsing https://pypi.org/simple/selenium/, manually downloading the 2.53.6 .tar.gz file, then extracting it and running setup.py install on the command line.
PS: Ideally, though, anyone should be able to use proxy settings from the command line (--proxy http://user:password#server:port) to get pip and then use it; however, for some reason, probably related to network security configurations that I didn't want to lose time with, this didn't work in my case.

Python cannot find file in current directory with PowerShell

I'm trying to set up a new coding environment for myself so that I may learn Python at home on Windows 10. I already installed Python 2.7 and I am able to run it in PowerShell using the python command. However, when I try to get it to run other files (namely HelloWorld.py) it is getting an error
C:\Python27\python.exe: can't open file 'HelloWorld.py': [Errno 2] No such file or directory
I am in the same folder as HelloWorld.py on PowerShell and when I type ls, it appears on the screen. Most of the other questions I've seen on here were resolved by changing the environment variables in System to include python, but I have already done that. I am looking for anything else to try.

Django Gramps no module named web.settings

I'm using Gramps 3.3.1 under Ubuntu 12.04 and trying to in Django Export/Import. The install is okay, but when I look at the installed addons, it says that it failed, with reason: "No module named web.settings".
I cann't for the life of me figure out how to fix this. I'm assuming that it's this line in the python script:
import web.settings as default_settings
Anyone have any ideas? I'm trying to get this data out and into a MySQL database, but I can't seem to.
Thanks!
When you run into an error where Python tells you "No module named blah" it really means it can't find "blah".
I would check your pythonpath and the filesystem permissions on the stuff in your path.
Edit
Your issue seems to be a known issue: http://www.gramps-project.org/bugs/view.php?id=5464
It's caused by not running Gramps from source, near as I can tell. It doesn't look like a Python Path issue, so much as the Gramps Django devs making assumptions where your Django settings would be (but I could be wrong).
As for Python Path, there's plenty of resources describing how to. The simplest way to check your Python path is to run echo $PYTHONPATH in a terminal. If you don't see it there, Python might not find it.