Manually delete project in Weblate - weblate

I did some very unspeakable things with my weblate installation in order to change the git-branch the translation files can be found on.
Weblate hated my attempts and now continues to give all kinda errors.
As final resort I would just love to delete the project and recreate it.
Only: the "Delete project" gives me a "500 Internal Server Error".
The project and its components aren't removed.
Trying to remove the components give a similar error.
Does anyone know how to clean up and remove a project by hand? Even if there are 50 steps or more, a solution is all I care about.
PS: The other projects on the server are still fully functional and should remain so.

You can always do the removal from the Django management shell:
$ ./manage.py shell
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from weblate.trans.models import Project
>>> project = Project.objects.get(slug='hello')
>>> project.delete()
But the deletion from admin interface should not be that slow on current versions, if you're up to date, please file issue on that.

Related

Downloading files from ftp via UDP but path is not rendered

Preface: This has to be done only via UDP. No TCP!
Enviroment: Client:Kali Linux OS. Server:Windows 10
Connection is established since other files were downloaded.
Tab to auto-fill is not available because it is udp connection
Question. Downloading files from ftp via UDP but path is not rendered as intended.
I'm already running mssql server 2017 and file location is correct as I confirmed it.
I also checked Official website. MicroSoft SQL Server
Path is \Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup\master.bak
The following is the command I tried.
tftp> get \Program\ Files\\Microsoft\ SQL\ Server\\MSSQL14.SQLEXPRESS\\MSSQL\\Backup\\master.bak
#Added two backslash to indicate directory.
This returns an error
Error code 256: File '\Program\' does not exist
Error code 256: File 'Files\\Microsoft\' does not exist
Error code 256: File 'SQL\' does not exist
Error code 256: File 'Server\\MSSQL14.SQLEXPRESS\\MSSQL\\Backup\\master.bak' does not exist
I did downloaded with
tftp> get \Windows\System32\cmd.exe
How do you type correct path in this case?
edit:Someone told me about 8.3 filename convention.
Accessing from non-8.3 OS to 8.3 FIlesystem might cause a problem.
Still, I didn't get why backslash weren't really rendered.
I did not manage to find the way with tftp, but you can use tftpy:
pip install tftpy
python
Python 2.7.18 (default, Apr 20 2020, 20:30:41)
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tftpy
>>> client = tftpy.TftpClient('192.168.1.20', 69)
>>> client.download('\Program Files\Microsoft SQL Server\MSSQL14.SQLEXPRESS\MSSQL\Backup\master.bak', 'master.bak')

Cannot import Selenium even when it's installed [duplicate]

After searching the web for hours i didnt yet find an answer to my problem. I am using Python 3.6 and i cant import selenium. I always get the message "No module named 'selenium''
I tried everything, i first downloaded selenium from this website https://pypi.python.org/pypi/selenium/3.6.0 .
Then I tried python -m pip install -U selenium and didnt work either. I tried some other things that people said but they didnt work either.
Im using windows 10.
Any help?
As you mentioned you are using Python 3.6 following the steps :
Open Command Line Interface (CLI) and issue the command python to check if Python is properly installed :
C:\Users\username>python
Python 3.6.1 (v3.6.1:69c0db5, Jan 16 2018, 17:54:52) [MSC v.1900 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Ensure pip is working properly :
C:\Users\username>pip
Usage:
pip <command> [options]
Commands:
install Install packages.
download Download packages.
uninstall Uninstall packages.
freeze Output installed packages in requirements format.
list List installed packages.
show Show information about installed packages.
check Verify installed packages have compatible dependencies.
search Search PyPI for packages.
wheel Build wheels from your requirements.
hash Compute hashes of package archives.
completion A helper command used for command completion.
help Show help for commands.
General Options:
-h, --help Show help.
--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
-V, --version Show version and exit.
-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
--log <path> Path to a verbose appending log.
--proxy <proxy> Specify a proxy in the form [user:passwd#]proxy.server:port.
--retries <retries> Maximum number of retries each connection should attempt (default 5 times).
--timeout <sec> Set the socket timeout (default 15 seconds).
--exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
--trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
--cert <path> Path to alternate CA bundle.
--client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
--cache-dir <dir> Store the cache data in <dir>.
--no-cache-dir Disable the cache.
--disable-pip-version-check
Don't periodically check PyPI to determine
whether a new version of pip is available for
download. Implied with --no-index.
Install latest selenium through pip :
C:\Users\username>pip install -U selenium
Collecting selenium
Downloading selenium-3.8.1-py2.py3-none-any.whl (931kB)
100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 942kB 322kB/s
Installing collected packages: selenium
Successfully installed selenium-3.8.1
Confirm that Selenium is installed :
C:\Users\username>pip freeze
selenium==3.8.1
Open an IDE (e.g Eclipse, PyCharm) and write a simple program as follows :
from selenium import webdriver
driver = webdriver.Firefox(executable_path="C:\\path\\to\\geckodriver.exe")
driver.get('https://stackoverflow.com')
Execute the program on which Firefox Quantum Browser will be initiated and the url https://stackoverflow.com will be accessed.
Python Download Location (Windows) :
Python (for Windows) can be download from the following location :
https://www.python.org/downloads/
I'm on VS Code in Windows 10, and here's how I solved it.
You need to pay attention to where the Python is located (in my case),
1) C:\Users\_Me_\AppData\Local\Programs\Python\Python38\
and where the Python looks for libraries/packages, including the ones installed using pip (again, in my case),
2) C:\Users\_Me_\AppData\Roaming\Python\Python38\
I don't know why these two locations are different (gotta fix it at some point). It seemed that Python was running from the first location, but it was looking for libraries in the second!:/
Anyway, since I have limited experience in Python , I just copied the \Lib\site-packages from the first location (including selenium folders) to \site-packages in second one in hopes of solving the issue, which worked out for me!
How to check for there locations
1) Open Python CLI, typed the following command:
which python
2) Open Python CLI, typed the following commands (From this answer):
>>> import site
>>> site.USER_SITE
EDIT
Since this seems a temporary solution, I uninstalled Python and reinstalled it again in a proper directory (other than the default install directory), and now which python and which pip point to the same folder! Problem solved!
If these solutions did not work for you, try looking into which Python interpreter your IDE is using (in my case I was using VSCode - you can find the interpreter in the bottom bar). Worked for me.
Easiest way is to copy all files of "venv" Lib, Scripts, Selenium and other folder into your main project folder.
This issue occur as pycharm directly take from virtual environment venv.
Hope this will resolve your problem :)

Maxmind .MMDB to .DAT? mod_maxminddb in Debian Repo?

There is allready another Thread about this which isn't really answered:
How to Convert a Maxmind .MMDB to .DAT?
Here Greg Oschwald, working at Maxmind, said that "The Legacy GeoIP builds (.dat) are not going away in the near future". Yeah, but the future is now, and they are going away on 1. April 2018 which is in a month ;) I really liked my current Apache-Configuration (Debian) using mod_geoip2 and GeoIP .dat-Databases. Works like a charm. So it's kind of anoying to change everything now. Especialy because there is no native Apache-Module like mod-geoip2 to use, but I have to build a module from source, install libraries and mess with my whole apache-config to enable apxs. And I don't have an automatic Update of the new module by repository but have to update it manually with new libraries and new tarballs when they are available. This is not very convenient.
Well, I could download the CSV-release, Add the IP-Ranges with Maxminds provided CSV-Converter (https://github.com/maxmind/geoip2-csv-converter/releases) write a script which transforms the bunch of csv-Files into a single "Legacy-Like" csv-File and transform this with the Debian Program (https://github.com/dankamongmen/sprezzos-world/blob/master/packaging/geoip/debian/src/geoip-csv-to-dat.cpp) to a .dat File. >Maybe< this could work for some time. But it's very ugly. Isn't there a better solution?
If not: Will there be a native Apache Module in the Debian Repository which removes the "build/install it yourself" part? Then I would have no issue with the new format.
Greetings daily

What is diff in apache svn version 6.0.38 vs 6.0.389418

I want to collect some buggy files.
So, I found data-set that present which file has a bug.
In data set, document said that Tomcat,6.0.389418,org.apache.jasper.compiler.Compiler file has a bug
In order to get bug file, i visit apache svn repository. And I found archive tomcat version 6_0_38 (http://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38)
But I cant get file more detail version (6.0.389418) there is only 6_0_38
Can I think of two versions as the same?
Thank you.
Most importantly, you should know that Tomcat 6 has seen its end of life in December 2016, and the latest version that I can find in the archives is 6.0.53.
Based on this alone: Upgrade! First to the latest version in the 6.0 branch, then to a version that actually will continue to get security fixes. I've never seen any problems when upgrading within the same major version - the tomcat developers do a great job keeping their upgrades compatible.
And last, to the letters of your question instead of the spirit: The third digit of Tomcat version numbers is counting up, one by one. There is no 6.0.389418. As Tomcat uses Subversion, and subversion counts up the commits one by one, you might be lucky to find something around commit #389418 or #9418. Note: I've not even looked at their SVN to check if these are legitimate commits in the time that you're referring to (not even what the current commit is).
Eh, it might be quite hard to really nail this build number, but there is also a good chance this is a build you are asking for. Read for explanation.
You are asking for version: 6.0.389418
If you look into this file:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/dist.xml
You can learn how build number is being built:
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}"/>
values are taken from:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/build.properties.default
# ----- Version Control Flags -----
version.major=6
version.minor=0
version.build=38
version.patch=0
version.suffix=
So the missing part of your version is 9418 which is should correspond to ${version.build} or (more unlikely) to ${version.patch}
In either case it might be not unambiguous, because often there is a build script used which performs multiple actions and as a result, appends its own version at the end of real package. I'd lean towards this explanation, because if this were to be a patch number, there would be some /patches directory in SVN, which I don't see in any other directories for more recent development.
But then, there is:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/bin/version.sh -> running function from:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/bin/catalina.sh
elif [ "$1" = "version" ] ; then
"$_RUNJAVA" \
-classpath "$CATALINA_HOME/lib/catalina.jar" \
org.apache.catalina.util.ServerInfo
else
Try to download it and run ./bin/version.sh

option to add new ZSQL method is not shown in Zope 2.13.6

When I installed ZSQL explicitly for Zope 2.13.6, I thought it will be easier to connect RDBMS. But option for adding ZSQL method from ZMI (management interface) is not shown. I have used build out to install ZSQL package. As this package comes as default in prior releases, i do not have to face this problem. Also no specific information is found for installing ZSQL package in Zope.
Kindly give the solution.
Regards,
CPK
"Works for me"::
$ /opt/Python-2.7.0/bin/virtualenv --no-site-packages /tmp/zsql
New python executable in /tmp/zsql/bin/python
Installing setuptools............................done.
$ /tmp/zsql/bin/easy_install Zope2==2.13.6 Products.ZSQLMethods==2.13.4
...
Finished processing dependencies for Products.ZSQLMethods==2.13.4
$ /tmp/zsql/bin/mkzopeinstance -u admin:123 -d /tmp/zsqlinst
$ /tmp/zsqlinst/bin/zopectl fg
...
2011-07-05 11:35:53 INFO Zope Ready to handle requests
The "Z SQL Method" option is in the ZMI add list. Selecting it shows a page which says,
"There are no SQL database connections. You need to add a Zope SQL database connection before
you can create a Zope SQL Method." After adding a package for my SQL backend, e.g.:
$ /tmp/zsql/bin/easy_install Products.ZMySQLDA
...
Finished processing dependencies for Products.ZMySQLDA
and restarting Zope, I added a "Z MySQL Database Connection", and was then able to add
and successfully test a "Z SQL Method" against the connection.
Add eggs in the product: Products.ZSQLMethods, but a warning, I think you still get errors: (I'm also trying to solve, no new post here.
Cleber J Santos
You need to have a Zope Database Adapter installed, and possibly a python DBAPI module, before that option is available.
My preference is to use SQLAlchemyDA for the database adapter and an appropriate DBAPI (I use cx_oracle for Oracle and psycopg2 for PostGreSQL, but SQLAlchemyDA supports most relational databases)