Auto PY to EXE

Getting Started [From https://pypi.org/project/auto-py-to-exe/]

Prerequisites

  • Python : 3.6-3.12

To have the interface displayed in the images, you will need chrome. If chrome is not installed or –no-chrome is supplied, the default browser will be used.

As of PyInstaller 4.0, Python 2.7 is no longer supported. Read “Python 2.7 Support” below for steps on how to use this tool with Python 2.7.

Installation and Usage

Installing Via PyPI

You can install this project using PyPI:

$ pip install auto-py-to-exe

Then to run it, execute the following in the terminal:

$ auto-py-to-exe

If you have more than one version of Python installed, you can use python -m auto_py_to_exe instead of auto-py-to-exe.

Installing Via GitHub

$ git clone https://github.com/brentvollebregt/auto-py-to-exe.git
$ cd auto-py-to-exe
$ python setup.py install

Then to run it, execute the following in the terminal:

$ auto-py-to-exe

Running Locally Via Github (no install)

You can run this project locally by following these steps:

  1. Clone/download the repo
  2. Open cmd/terminal and cd into the project
  3. Execute python -m pip install -r requirements.txt

Now to run the application, execute python -m auto_py_to_exe. A Chrome window in app mode will open with the project running inside.

Make sure you are in the directory below auto_py_to_exe (you will be after step 3) when calling python -m auto_py_to_exe or you will need to reference the folder auto_py_to_exe absolutely/relatively to where you currently are.

Using the Application

  1. Select your script location (paste in or use a file explorer)
    • Outline will become blue when file exists
  2. Select other options and add things like an icon or other files
  3. Click the big blue button at the bottom to convert
  4. Find your converted files in /output when completed

Easy.

Arguments

Usage: auto-py-to-exe [-nc] [-c [CONFIG]] [-o [PATH]] [filename]

ArgumentTypeDescription
filenamepositional/optionalPre-fill the “Script Location” field in the UI.
-nc, –no-chromeoptionalOpen the UI using the default browser (which may be Chrome). Will not try to find Chrome.
-nu, –no-uioptionalDon’t try to open the UI in a browser and simply print out the address that the application can be accessed at.
-c [CONFIG], –config [CONFIG]optionalProvide a configuration file (json) to pre-fill the UI. These can be generated in the settings tab.
-o [PATH], –output-dir [PATH]optionalSet the default output directory. This can still be changed in the ui.
-bdo [FOLDER_PATH], –build-directory-override [FOLDER_PATH]optionalOverride the default build directory. Useful if you need to whitelist a folder to stop your antivirus from removing files.
-lang [LANGUAGE_CODE], –language [LANGUAGE_CODE]optionalHint the UI what language it should default to when opening. Language codes can be found in the table under “Translations” below.

If you are running this package locally, you will need to call python -m auto_py_to_exe instead of auto-py-to-exe

JSON Configuration

Instead of inserting the same data into the UI over and over again, you can export the current state by going to the “Configuration” section within the settings tab and exporting the config to a JSON file. This can then be imported into the UI again to re-populate all fields.

This JSON config export action does not save the output directory automatically as moving hosts could mean different directory structures. If you want to have the output directory in the JSON config, add the directory under nonPyinstallerOptions.outputDirectory in the JSON file (will need to create a new key).

Video

If you need something visual to help you get started, I made a video for the original release of this project; some things may be different but the same concepts still apply.

Issues Using the Tool

If you’re having issues with the packaged executable or using this tool in general, I recommend you read my blog post on common issues when using auto-py-to-exe. This post covers things you should know about packaging Python scripts and fixes for things that commonly go wrong.

If you believe you’ve found an issue with this tool, please create an issue (click “Get started”) and fill out the template provided by the “Bug report” option. If your issue is only associated with your application, please do not create an issue in this repository – instead, comment on the help post, video or create a new discussion.

When filling out the template, be sure to clearly explain what’s happening, give reproduction steps and a minimal reproducible example and explain what you believe should have happened. Without these, it’s going to take longer to identify the issue.

Translations

LanguageTranslatorTranslated
Arabic (العربية)Tayeb-AliUI
Brazilian Portuguese (Português Brasileiro)marleyasreneoliveirajrUI
Bulgarian (Български)kbkozlevUI and README
Chinese Simplified (简体中文)jiangzhe11UI and README
Chinese Traditional (繁體中文)startgoUI
Czech (Čeština)Matto58UI
Dutch (Nederlands)barremansUI
EnglishUI and README
Finnish (Suomen kieli)ZapX5UI and README
French (Français)flaviedespUI
German (Deutsch)hebensackhhUI
Greek (Ελληνικά)sofronasUI
Indonesian (Bahasa Indonesia)MarvinZhongUI
Italian (Italiano)itsEmax64UI
Japanese (日本語)NattyanTVUI
Korean (한국어)jhk1090UI and README
Persian (فارسی)DrunkLeenAr.dstUI and README
Polish (Polski)AkuczakuUI
Russian (Русский)OlegUI
SerbianrinaUI
Spanish (Español)enriiqueeUI
Spanish Latam (Español Latam)MatyrelaUI
Thai (ภาษาไทย)teerut26UI (partial)
Turkish (Türkçe)mcagriaksoyUI and README
Ukrainian (Українська)AndrejGorodnijUI
Vietnamese (Tiếng Việt)7777HeckerUI

Want to add a translation for another language? Update i18n.js and submit a PR or attach it in an issue.

Python 2.7 Support

As of PyInstaller v4.0 released on Aug 9 2020, Python 2.7 is no longer supported; although you can still use this tool with Python 2.7 by installing an older version of PyInstaller. PyInstaller v3.6 was the last version that supported Python 2.7; to install this, first uninstall any existing versions of PyInstaller and then execute python -m pip install pyinstaller==3.6.

Testing

Tests are located in tests/ and are run using pytest:

$ pip install pytest
$ pip install -e .
$ pytest

Screenshots

Troubleshooting Mobile Data Access Issues in Newly Launched Websites: A Case Study

The digital era has witnessed a growing number of businesses leveraging the power of the internet to reach global audiences. Websites have become a critical tool in today’s business landscape, forming the cornerstone of many digital marketing strategies. However, it is not uncommon for website owners to encounter accessibility issues post-launch, especially over various networks. This article delves into one such issue and the journey to its resolution, providing a case study for those who may encounter similar problems.

The Problem

The focus of our narrative revolves around a recently launched website. Initially, it seemed to perform flawlessly, readily accessible from home and office broadband connections. However, an accessibility issue surfaced when the site was accessed over 3G, 4G, and LTE networks. In these cases, instead of loading as it should, the website redirected to a cPanel misconfiguration page.

This problem manifested in real-world scenarios, too. When a user disconnected WiFi on a mobile device and attempted to access the site via mobile data, the site didn’t load as expected. Instead, the user was navigated to the aforementioned misconfiguration page. This issue not only limited the website’s accessibility but also impacted the user experience negatively, potentially driving away potential customers.

The Investigation

Following the identification of the problem, an intensive search for solutions began. This investigation encompassed extensive searches on Google, consulting the web hosting manager (WHM) and cPanel, and updating various elements of the site in hopes of remedying the issue. Despite these diligent efforts, resolving the issue proved elusive.

The breakthrough came when attention was drawn towards Google Workspace, a suite of cloud computing, productivity, and collaboration tools. The suite includes a tool for managing DNS settings, specifically adding the correct Zone File entries, which became a critical aspect of this troubleshooting process.

The Culprit: Incorrect DNS Settings

After a painstaking process of elimination, it was determined that the issue lay within the DNS settings, specifically the AAAA record in the Zone File entries within Google Domains. Over mobile data and certain VPNs, the site would fail to load due to this incorrect DNS configuration. The AAAA record, responsible for mapping a domain name to the IP address of the computer hosting the website, was erroneous, causing the site’s inaccessibility over certain networks.

The Solution: Correcting DNS Settings

To rectify the problem, the erroneous AAAA entry was deleted from Google Domains. This simple action corrected the DNS misconfiguration that was causing the accessibility issue. As a result, the website began loading correctly over mobile data and the VPNs that previously encountered issues.

Conclusion: The Importance of Correct DNS Configuration

This case study underscores the importance of correctly configuring DNS settings when launching a website. DNS misconfigurations, such as an incorrect AAAA record, can cause accessibility issues and negatively impact the user experience, especially for those using mobile data or VPNs. Therefore, it’s crucial for website owners to ensure their DNS settings are accurate and up-to-date, checking and rechecking these settings if any accessibility issues arise.

Remember, a website’s success is not just in its design and content but also in its seamless accessibility across various networks and devices. Paying attention to the technical aspects of your website, like DNS configurations, can make all the difference.

Google Workspace and Google Domains Zone File Entries. Can’t Access Website Over 3G, 4G, or LTE.

Recently launched a website that seems to encounter some issues with accessibility over 3G, 4G, and LTE networks. While the website functions flawlessly when accessed through home or office broadband connections, it fails to do so over mobile data and instead, redirects to a cPanel misconfiguration page. A practical instance of this issue is when I switch off WiFi on my phone and try to access the website via mobile data – it navigates to the aforementioned misconfiguration page. I’ve been attempting to find a solution through WHM and cPanel as well as extensive Google searches, and I’ve also attempted to update various aspects of the site. Despite these efforts, was still struggling to resolve the issue.

Google Workspace has a tool to add the correct Zone File entries and this is what caused a problem.

Over Mobile data and some VPNs, the site would not load.

To correct the problem I deleted the AAAA entry in Google Domains.

What is the difference between ‘Maximum messages per day’ and ‘Total recipients per day’

What is the difference between ‘Maximum messages per day’ and ‘Total recipients per day’.—>”Maximum message” per day means total message sent by single user and “Total Recipients per day “—>Email addresses (recipients) count each time a message is sent

WHM Cpanel Node.js

https://confluence2.cpanel.net/display/CKB/How+to+Install+a+Node.js+Application

https://codeburst.io/installing-reactjs-and-creating-your-first-application-d437706498ed

Use the Node JS with full path as: # /opt/cpanel/ea-nodejs16/bin/node -v v16.20.2 Official cPanel documentation: https://docs.cpanel.net/knowledge-base/web-services/how-to-install-a-node.js-application/

How to install a Node.js application

Timothy Haines

  • 5 months ago
  • Updated

Follow

Not yet followed by anyone

Introduction

This article discusses how to install a Node.js application on a cPanel account.

Procedure

To install an application:

  1. Log in to the server as the cPanel user via SSH or Terminal‘ in cPanel.
  2. Create the application’s directory relative to the user’s home directory.
    mkdir nodejsapp
  3. Change to the application’s directory.
    cd nodejsapp
  4. Create the app.js file with a text editor.
    Please note we strongly recommend that you create the file with this exact name because Passenger searches for this filename when it executes.
  5. Add the application’s configuration to the app.js file. This will resemble the following example:
    const http = require(‘http’) const hostname = ‘127.0.0.1’; const port = 3000; const server = http.createServer((req, res) => { res.statusCode = 200; res.setHeader(‘Content-Type’, ‘text/plain’); res.end(‘Hello World! NodeJS \n’); }); server.listen(port, hostname, () => { console.log(`Server running at http://${hostname}:${port}/`); });
  6. Save the changes.
  7. Close the text editor.

Please note after installing that application, it must be registered in cPanel with “Application Manager.”

From: https://support.cpanel.net/hc/en-us/articles/6840609038103-How-to-install-a-Node-js-application

Prusa Printer Heater Cartridge and Thermistor Resistance Values, Plus 1.75 mm, MK2.5, MK2.5S, MK3, MK3S, MMU1, MMU2, MINI, MK3S+, MINI+

In many cases, we need to decide whether a component is faulty, or just wrongly installed. There are also situations where we need to decide exactly which component should be replaced. We are using the multimeter (multitester) for checking the continuity of wires, measuring the resistance values of heaters and thermistors, and measuring the voltage coming from the PSU and going to the heaters.

If you don’t have a multimeter, you can consider one that is similar to what is depicted above. The device does not have to be expensive. 10-15 USD/EUR will get you something that does the job just fine.

How to measure

To get started, we first have to properly connect the two measurement probe cables to the multimeter.

  • The black lead goes into the COM port.
  • The red lead goes into the port for Volts (V)Ohms (Ω), and Frequency (Hz).

Then we have to set the correct voltage or resistance range on the multimeter, depending on which component you are testing. For example, you can not measure 100K Ohm (Kilo=1000) if your meter is set to only 200 Ohm. You must set ut to 200K.

Reference for multimeter settings

Resistance setting:

  • For all thermistors, set the resistance value to “200K” Ohm (green arrow), since the thermistor should have around 100K.
  • For all heaters, set the resistance value to “200” Ohm (green arrow), since heaters read between 1 and 20 Ohm.

Voltage setting:

If measuring the voltage going to a heater or to the printer itself it is important to remember that the MK2/S and MK2.5S are 12V systems, while the MK3S is a 24V system.

  • For a 12V system, set the meter to “20” volt (red arrow).
  • For a 24V system, set the meter to “200” volt (red arrow).

Continuity setting:

The setting is indicated by the purple arrow and will display 0 and give a beep if the two probes connect, either by touching or connected by a cable. This is to test if a wire is broken or not.

Where to measure

For every component, there are several options, our main focus will be on the connectors. The measurement appears on the multimeter LCD as soon as the measurement probes touch the component. To obtain the correct and relevant values, this is where you need to apply the probes:

Thermistors: metal inserts in plastic connectorsHot end/Heat bed heater: screws holding the cables in the connector
  • Heat bed: the solder pads/screws holding the wires on the heat bed or the ends connected to the mainboard (green square). You must remove the cables from the board before you do the measurement! On MK2S/MK2.5S you can measure voltage and resistance on the screws holding the cables in the connector. Remove the connector from the board before measuring.

Fuses or wires

Fuses can be checked by using the continuity feature on a multimeter. The only thing that will be checked is whether the component is able to conduct signals or power. By touching each of the measurement leads of the multimeter to the other end of the fuse or wire, a signal (beep or 0 value on the multimeter screen) will indicate that the component is intact and therefore, should work.

The fuse for the PSU can be taken out of the slot above the power cord by using a flat head screwdriver.

Resistance

For this measurement, the printer has to be turned off, at room temperature and the component that is measured has to be unplugged from the RAMBO!

In order to check if heaters are within their range of specified resistance, the following measurements can be done. For this measurement, the multimeter needs to be set to the lowest range which includes 20Ω.

The measurement can be done on the screws in the connector for both the hot end heater and the heat bed. For the heat bed, it is also possible to probe the solder pads/screws holding down the cables. Please see the pictures above.

Heaters 

MINIHot end heater[12.3 Ω – 15.1 Ω]
 Heat bed[4.5 Ω – 6.5 Ω]
MK3/SHot end heater[12.3 Ω – 15.1Ω]
 Heat bed[2.0 Ω – 4.0 Ω]
MK2/SHot end heater[3.1 Ω – 3.8 Ω]
 Heat bed[0.9 Ω – 1.1 Ω]

The measurement of the resistance of the hot end heater and the heatbed with a multimeter is only indicative and may vary from the actual resistance by tens of percent depending on the temperature. The measured values should therefore only be taken as a guide in identifying the problem.

Thermistors

For this measurement, the printer has to be turned off, at room temperature and the component that is measured has to be unplugged from the RAMBO!

In order to check if thermistors are within their range of specified resistance, the following measurements can be done. For this measurement, the multimeter needs to be set to the lowest range which includes 150 kΩ. It is common this is 200K on multimeters.

All thermistors are rated to be 100 kΩ at 25 °C. To be realistic, with a varying temperature between 20°C and 30°C, you can expect [80 kΩ – 125 kΩ].

Always check both thermistors to compare the two. Are they different, one is probably faulty.

Voltage

For this measurement, the printer will be turned on and there will be a risk of shorting the circuit. Always make sure to keep + and – from touching each other!

In order to check if the correct voltage is being supplied to the heaters, the following measurements can be done. For this measurement, the multimeter needs to be set to the lowest range which includes 24V.

The measurement can be done on the screws in the connector for both the hot end heater and the heat bed. For the heat bed, it is also possible to probe the solder pads/screws holding down the cables. In this case, the connectors have to be connected to the RAMBO.

To measure, start preheating the printer to PLA and measure the component you are investigating.

The following values can be expected:

MINIHot end heater[23V – 24.5V]
 Heat bed[23V – 24.5V]
MK3/SHot end heater[23V – 24.5V]
 Heat bed[23V – 24.5V]
MK2/SHot end heater[11V – 13.5V]
 Heat bed[11V – 13.5V]

If you suspect the PSU is dead, and you have checked the external fuse, you can probe the terminals directly. Remove the two screws holding the cover (yellow circles) and you will have access to the power terminals.

Be very careful when probing the contacts. Make sure you do not short-circuit any terminals.

VCC and ground (+ and -) are divided into two pairs, where the two left connectors are VCC (red arrows) and the two right connectors are ground (blue arrows). Measure one from each pair.

Measuring the DC output on brick PSUs, like supplied with the Original Prusa MINI, is not recommended. You can easily create a short circuit and damage yourself or the component.

How To Create or Delete a MySQL Database or User

https://www.hostgator.com/help/article/how-do-i-create-a-mysql-database-a-user-and-then-delete-if-needed

How To Create or Delete a MySQL Database or User

Databases offer a method for easily managing large amounts of information over the web. They are necessary to run many web-based applications, such as bulletin boards, content management systems, and online retail shops.

Note: Resellers can create accounts with usernames up to 16 characters long. Please note that MySQL Databases and Usernames will only include the first 8 characters. For example:

  • cPanel username: lengthyusername
  • MySQL Database: lengthyu_wrdp1
  • MySQL Username: lengthyu_johndoe

This article discusses the different features of the MySQL Database. Please click the links below for the instructions.

This video will show you how effortless it is to create the database and the database user and assign that user to your new database. This is standard practice for anyone looking to install third-party programs that use MySQL databases manually.

Disclaimer: Your cPanel may look new, but the steps should be relatively the same.


Create or delete a MySQL database

How to create a MySQL database

  1. Log in to cPanel.
  2. Look for the Databases section, then click MySQL DatabasesTake me there!cPanel MySQL Database icon
  3. In the New Database field, type a name for your database.Create New Database
  4. Click Create Database.
  5. Click Go Back.
    • The new database will appear in the Current Databases section.

How to delete a MySQL database

  1. Navigate to the Current Databases section of MySQL Databases.
  2. In the Actions column of the table, click Delete next to the database you wish to delete.Delete Database
  3. Confirm that you wish to remove the database permanently.Database Delete Confirmation

Create or delete a database user

What is a MySQL user, and why is it important?

The MySQL user is a record in the MySQL server created for authentication purposes. This is different from your usernames when logging into Windows or even in your cPanel/WHM. Setting up a MySQL user provides more security to your website’s databases as you can assign permissions to each user. Aside from you, the website’s owner, you do not wish to grant just any user all access to your database.

After creating the database, you will need to create a user and assign privileges. Please note that MySQL user accounts must be created separately from mail and web administrator accounts.

How to create a database user

  1. Log in to cPanel.
  2. Look for the Databases section, then click MySQL DatabasesTake me there!cPanel MySQL Database icon
  3. Click the Jump to MySQL Users link at the top-right corner of the page. You may also scroll a little bit down to the MySQL User section.
  4. Under Add New User, enter a username.MySQL Users Add New User
  5. Enter a password in the Password field.
    • For help generating a strong password, click the Generate Password button.
  6. Once the password is confirmed, click on the Create User button.

How to delete a database user

  1. Navigate to the Current Users section of MySQL Databases.
  2. Locate the database user you wish to delete, then click its Delete icon.Delete Current Users
  3. Click the Delete User icon to confirm the deletion.Confirm User Deletion

Define a user’s privileges and how important they are

You need specific users to have permission to perform website management tasks, like running queries or modifying databases. This is when we grant privileges. Privileges determine how a user can interact with the database. For example, privileges will dictate whether or not the user can add and delete information.

How to assign privileges to a database user

  1. Log in to cPanel.
  2. Look for the Databases section, then click MySQL DatabasesTake me there!cPanel MySQL Database icon
  3. Under Add User to Database, select a user from the User dropdown menu.Add User To Database
  4. From the Database dropdown menu, select the database you wish to allow the user access to.
  5. Click Add.
  6. Select the privileges you wish to grant the user or select ALL PRIVILEGES on the next page.Add User TO Database
  7. Click Make Changes, then click Go Back.

How to unassign a user from a database

  1. Navigate to the Current Databases section of MySQL Databases.
  2. Locate the database you wish to modify.
  3. In the Privileged Users column for that database, click the trash icon.Priveleged Users

Using the database

Now that you can create databases and users and assign appropriate privileges, you can use the following articles as references in editing and connecting to your databases.

How to delete a database without using cPanel

The steps below are done using SSH. If you know how to use it, follow these steps; however, if you need help, contact us via phone or chat for assistance.

  1. Make a backup of the database with SSH using the command line below. Use your cPanel password.username@domain [~] # mysqldump --password username_database > username_database.db Enter password: (cPanel Password) username@domain [~] #
  2. Next, use the DROP DATABASE command inside of mysql to delete the database. mysql> SHOW DATABASES LIKE "username_database"; +------------------------------+ | Database (username_database) | +------------------------------+ | username_database | +------------------------------+ 1 row in set (0.02 sec) mysql> DROP DATABASE username_database; Query OK, 0 rows affected (0.00 sec) mysql> SHOW DATABASES LIKE "username_database"; Empty set (0.02 sec) mysql>

Go to the DROP DATABASE Statement link for further information on this command.

How to drop one or multiple users at a Time

Using the MySQL statement DROP USER allows you to remove user accounts and their privileges from the database.

Syntax:

DROP USER ‘user’@’host’;
  • User: The user account you want to drop.
  • Host: The host server name of the user account. Format: ‘user_name’@’host_name’.

Example:

DROP USER ‘snappy01’@’localhost’;

To DROP multiple user accounts, follow this format:

DROP USER ‘snappy01’@’localhost’, ‘snappy02’@’localhost’;

How to grant Privileges in MySQL

To grant privileges to users in MySQL, you are first required to have the CREATE USER and GRANT privileges.

Syntax:

GRANT permission1, permission2 ON database_name TO 'user'@'localhost';

Example:

GRANT SELECT, INSERT, DELETE ON example_db TO ‘snappy02’@’localhost’;

How to view privileges in MySQL

To show existing users and their privileges in MySQL, run the command SHOW GRANT.

Syntax:

SHOW GRANTS FOR 'database_user'@'localhost';

Example:

SHOW GRANTS for ‘snappy02’@’localhost’;

Sample Output:

mysql> SHOW GRANTS FOR ‘snappy02’@'localhost';
+------------------------------------------------------------------+
| Grants for snappy02@localhost |
+------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `snappy02`@`localhost` |
| GRANT SELECT, INSERT, UPDATE ON `example_db`.* TO `snappy02`@`localhost` |